pythonizer
pythonizer copied to clipboard
pythonizer goes into infinite loop if ';' is not on the line
This test cases causes the pythonizer to go into an infinite loop (or infinite recursion):
next if not (($year,$month,$day) = ($file =~ /^(\d{4})_(\d{2})_(\d{2})$/))
;
sub finish in Perlscan.pm calls Pythonizer::getline() to get the next line, but that returns $line because @BufferValClass is not empty. My solution is to create a @tmpBuffer to save @BufferValClass, set it to empty, then put it back around the call to Pythonizer::getline() in sub finish.
Fixed in https://github.com/snoopyjc/pythonizer