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 $class in string eq at ../../Pythonizer.pm line 2171 #338

Closed snoopyjc closed 1 year ago

snoopyjc commented 1 year ago

Running ../../pythonizer -M -v0 -s ./PyModules/Date/Manip/Date.pm for use Date::Manip::Date Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2171, line 568. Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2286, line 568. Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2305, line 568. Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2307, line 568. Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2309, line 568. Use of uninitialized value $class in string ne at ../../Pythonizer.pm line 2311, line 568. Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2313, line 568. Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2327, line 568. Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2386, line 568. Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2401, line 568. Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2401, line 568. Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2404, line 568. Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2406, line 568.

my($y,$m,$d,$h,$mn,$s,
  $mon_name,$mon_abb,$dow_name,$dow_abb,$dow_char,$dow_num,
  $doy,$nth,$ampm,$epochs,$epocho,
  $tzstring,$off,$abb,$zone,
  $g,$w,$l,$u) =
    @+{qw(y m d h mn s
          mon_name mon_abb dow_name dow_abb dow_char dow_num doy
          nth ampm epochs epocho tzstring off abb zone g w l u)};

Issue is caused by @+ and @- not being recognized as special variables.

snoopyjc commented 1 year ago

Fixed in v1.030