New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect binding of lexicals #798
Comments
From mjtg@cus.cam.ac.uk********************* use strict; package X; sub new { my $obj = { { unless (defined $x) { # <---- AAA my $t = shift; # print "$x $y\n"; my $z = eval $obj->{EQN}; package main; my $x = new X; print "Z is $z.\n"; Now, running the above program generates the following: Use of uninitialized value at (eval 1) line 1. Bug shows in both 5.005_03 and 5.0065_62. Running under the debugger, we see at points AAA and BBB that $x and $y X::calculate(-:21): unless (defined $x) { So the binding of lexicals has got confused in some way. Mike Guy % ./perl -V Characteristics of this binary (from libperl): |
From [Unknown Contact. See original ticket]This seems to still be an issue @8101. -spp Ala Qumsieh <aqumsieh@matrox.com> reports in c.l.p.misc that the ********************* use strict; package X; sub new { my $obj = { { unless (defined $x) { # <---- AAA my $t = shift; # print "$x $y\n"; my $z = eval $obj->{EQN}; package main; my $x = new X; print "Z is $z.\n"; Now, running the above program generates the following: Use of uninitialized value at (eval 1) line 1. Bug shows in both 5.005_03 and 5.0065_62. Running under the debugger, we see at points AAA and BBB that $x and $y X::calculate(-:21): unless (defined $x) { So the binding of lexicals has got confused in some way. Mike Guy |
From The RT System itself$ ./perl -w -Ilib ../t.pl |
From The RT System itselfuse strict; package X; sub new { my $obj = { { unless (defined $x) { # <---- AAA my $t = shift; # print "$x $y\n"; my $z = eval $obj->{EQN}; package main; my $x = new X; print "Z is $z.\n"; |
From @gbarrThis is still present in 5.8.0 |
@iabyn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#1725 (status was 'resolved')
Searchable as RT1725$
The text was updated successfully, but these errors were encountered: