in reply to Re^3: Assigning to the CODE slot of a GLOB whose REF is held in a lexical?
in thread Assigning to the CODE slot of a GLOB whose REF is held in a lexical?
oops, right, but it doesn't work for another reason:
use strict; use warnings; my $bar = 1; my $barref = \*bar; *$barref = sub { "bar" }; print &{ *$barref }(), $/; print ${ *$barref }, $/; # XXX undefined, should be 1. print *$barref{CODE}->(), $/; print ${*$barref{SCALAR}}, $/; # XXX undefined, should be 1.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Assigning to the CODE slot of a GLOB whose REF is held in a lexical?
by revdiablo (Prior) on Nov 16, 2004 at 07:50 UTC | |
by ikegami (Patriarch) on Nov 16, 2004 at 07:54 UTC |