> [EMAIL PROTECTED] - Sat Jul 02 11:28:26 2005]: > > On Sat, Jul 02, 2005 at 10:03:42AM -0000, houstorx @ rpc142. cs. man. > ac. uk wrote: > > Lvalue functions don't work properly when running under the > > debugger (perl -d). For example, the following code: > > > > my $x = 'badbad'; > > sub x :lvalue {$x} > > x = "good"; > > print "The value of \$x is: $x\n"; > > > > prints 'The value of $x is: badbad' when you run it with the > > debugger. This happens with every version of perl that I've > > tested, including 5.8.6 and 5.9.2. > > The reason is that when running under the debugger, all function calls > are > wrapped by a call to BD::sub, which does (in outline) > > if (wantarray) > @res = &$sub; > ... > @res; > } > else { > $res = &$sub; > ... > $res; > } > > and of course that blows away the lvalue-ness of the value returned by > the > sub. > > Can't see an easy way op fixing it. > > >
Actually, this is a old known bug. Merging this one with RT #7013.