Skip to content

Possible typos in 2 files #2

@dim6003

Description

@dim6003

Hello there,
Great project!

pythonizer (why doesn't it have the .pl extension by the way?) at line 111 , a '%' character missing in front of ENV : $HOME=%ENV{'HOME'}
PerlScan.pm at line 326 : substr instead of subscr
Running it on ubuntu 20.04.1 (Perl 5.26) it fails on the code I try to convert, seems to enter a dead loop (if using it wth option -d5, I get unending series of :
Generated parcial line get_config([re.split(separ,))([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,) Generated parcial line get_config([re.split(separ,))([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([re.split(separ,)([
while converting line 234 from perl source. Seems to always hang at that line number, whatever I do in my perl source...

Hope this helps!

Edit: since I wrote the above, I noticed pre_pythonizer has issues with the following constructs, so I rewrote to avoid them, but still the same pb with my code (without any -d option, complains after a while that it encountered a deep recursion at pythonizer line 1483.
comment after the opening { of an if,else,elsif etc single line sub, eg sub my_function {return substr($0,1,1);} single line if, elsif, else, eg if (<condition>) {print Something";

Also noticed the following message in pre_pythonizer output : pre_-366E: Checking reformatted source code via perl -cw produced some errors (RC=65280). Please correct them before proceeding,
although my original code has no errors. Seems due to moving all initial variables declaration into a main sub at the end of the file.

Edit2:
Also noticed that it doesn't like the Block if(EXPR) single line construct. Rewrote them, but still hanging.
comments after line ending semi-colon get lost.
doesn't like function calls without parenthesis eg foo= substr bar,0,2;

Edit3:
ok, I think I got to the code that puzzles pythonizer, it is a call to the perl standard "split" function, which expects as a first parameter a regex /abc/ (or in my case /$variable/). This case seems not taken care of in pythonizer, in function "expression". it's one of the rare cases when the regex /abc/ is not preceeded by any '~' character. Not ready to suggest a correction though!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions