in reply to Re: Re: Unpredicted late destruction
in thread Unpredicted late destruction
I've discovered that the same problem exists for functions called in an if expression as well. Adding the following test to the bottom of your script does the wrong thing in 5.6.1 but the right thing in 5.8.0:
Interestingly (to me, anyway), there didn't seem to be a problem with while() clauses:print "if: pre\n"; if (f()) { print "if: inside\n"; my $ifobj = bless ["if"]; } print "if: post\n";
This does the right thing on 5.6.1.print "while: pre\n"; while (f()) { print "while: inside\n"; my $wobj = bless ["while"]; last; } print "while: post\n";
Thanks again!
Alan
|
|---|