snoopyjc / pythonizer

Automatic translator from Perl to Python
https://snoopyjc.org/pythonizer/
Artistic License 2.0
12 stars 1 forks source link

Use of uninitialized value in string eq at ../../Perlscan.pm line 9614, <SYSIN> line 304. #339

Closed snoopyjc closed 1 year ago

snoopyjc commented 1 year ago

Use of uninitialized value in string eq at ../../Perlscan.pm line 9614, line 304. Use of uninitialized value in string eq at ../../pythonizer line 16525, line 304. substr outside of string at ../../Pythonizer.pm line 2740, line 366. Use of uninitialized value $s in string eq at ../../Pythonizer.pm line 2741, line 366. Use of uninitialized value $s in string eq at ../../Pythonizer.pm line 2743, line 366. Use of uninitialized value $s in index at ../../Pythonizer.pm line 2746, line 366. Use of uninitialized value $s in string eq at ../../Pythonizer.pm line 2748, line 366.

Use of uninitialized value $ValPerl[2] in string eq at ../../pythonizer line 1890, line 3240. Use of uninitialized value $ValClass[2] in string eq at ../../pythonizer line 1948, line 3240. Use of uninitialized value $ValPerl[2] in string eq at ../../pythonizer line 1960, line 3240. Use of uninitialized value $ValPerl[2] in pattern match (m//) at ../../pythonizer line 1997, line 3240. Use of uninitialized value $ValClass[2] in string eq at ../../pythonizer line 2008, line 3240. Use of uninitialized value within @ValClass in string eq at ../../pythonizer line 10874, line 3240. Use of uninitialized value within @ValClass in string eq at ../../pythonizer line 10993, line 3240.

Source is PyModules/Date/Manip/Date.pm

2 issues caused this:

  1. @ISA assignment without 'our' wasn't being seen as an @ISA assignment
  2. @{... with the } on the next line was calling enter_block() instead of being recognized as a type conversion.
snoopyjc commented 1 year ago

Fixed in v1.030