J
Jason Crowther
I've stumbled across a little strangeness when we had to do an
emergency upgrade from perl 5.6.0 to perl 5.8.0.
I have some code that works fine under 5.6.0 but goes down in flames
in 5.8.0. the error I'm getting is "Can't find label...".
I can replicate this issue with two simple files:
test.pl:
#!/usr/bin/perl
print "test 1\n";
goto SKIP;
print "test 2\n";
SKIP:
print "test 3\n";
1;
caller.pl:
#!/usr/bin/perl
require 'test.pl';
exit 0;
here's what you get when you run these on 5.6.0:
$ ./test.pl
test 1
test 3
$ ./caller.pl
test 1
test 3
here's what happens on 5.8.0:
$ ./test.pl
test 1
test 3
$ ./caller.pl
test 1
Can't find label SKIP at test.pl line 5.
Compilation failed in require at ./caller.pl line 2.
I'm not sure what could be causing the problem. is this a bug or new
default perl behavior? I couldn't find any relavent previous posts.
thanks for any help!
ps. I know that goto's are evil to begin with! I'm slowly but surely
working the goto's out this historical code... ;-)
emergency upgrade from perl 5.6.0 to perl 5.8.0.
I have some code that works fine under 5.6.0 but goes down in flames
in 5.8.0. the error I'm getting is "Can't find label...".
I can replicate this issue with two simple files:
test.pl:
#!/usr/bin/perl
print "test 1\n";
goto SKIP;
print "test 2\n";
SKIP:
print "test 3\n";
1;
caller.pl:
#!/usr/bin/perl
require 'test.pl';
exit 0;
here's what you get when you run these on 5.6.0:
$ ./test.pl
test 1
test 3
$ ./caller.pl
test 1
test 3
here's what happens on 5.8.0:
$ ./test.pl
test 1
test 3
$ ./caller.pl
test 1
Can't find label SKIP at test.pl line 5.
Compilation failed in require at ./caller.pl line 2.
I'm not sure what could be causing the problem. is this a bug or new
default perl behavior? I couldn't find any relavent previous posts.
thanks for any help!
ps. I know that goto's are evil to begin with! I'm slowly but surely
working the goto's out this historical code... ;-)