in reply to Re^5: OO-call bug uncovered & autovivified functions: defined? exists?
in thread OO-call bug uncovered & autovivified functions: defined? exists?
No, it doesn't. The function gets created by sub before \& is executed.
print "a:", exists(&frobnicate)?1:0, "\n"; # 1 my %OPS = ( frob => \&frobnicate, knob => \&knobnicate, ); BEGIN { print "b:", exists(&frobnicate)?1:0, "\n"; } # 0 sub frobnicate { '...' } sub knobnicate { '...' }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: OO-call bug uncovered & autovivified functions: defined? exists?
by Somni (Friar) on Oct 29, 2007 at 02:38 UTC |