Subject: | Bareword "FIN" and "FOUT" not allowed while "strict subs" |
perl-5.14.2
Term-ReadLine-1.14
While debugging a problem with the perl debugger I was confronted with the fact that the debugger did not stop but runs through and spits out a lot of strange "Compilation failed" error messages. The first two strange lines were
Bareword "FIN" not allowed while "strict subs" in use at /home/micsw/perl5/lib/perl5/Term/ReadLine.pm line 272.
Bareword "FOUT" not allowed while "strict subs" in use at /home/micsw/perl5/lib/perl5/Term/ReadLine.pm line 274.
264 #local (*FIN, *FOUT);
265 my ($FIN, $FOUT, $ret);
...
272 open FIN, ( $^O eq 'MSWin32' && $console eq 'CONIN$' ) ? "+<$console" :
273 "<$console";
274 open FOUT,">$consoleOUT";
I have fixed the lines 272 and 274 using the already defined lexical variables $FIN and $OUT. My debugging problem disappears. I don't understand why the switch from bareword filehandles to lexically scoped filehandles was seemingly only done half.