in reply to Re: How to de-reference a coderef?
in thread How to de-reference a coderef?
Oh there *is* a way, but it's not big and it's not clever and won't work with anonymous subs, but you can do it if you really, really, really must:
See I told you it wasn't big or clever ....+ sub foo { } + my $bar = \&foo; + foreach my $foo ( keys %:: ) { my $zub = \&{$::{$foo}}; if ( $bar eq $zub ) { print $foo,"\n"; last; } }
/J\
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: How to de-reference a coderef?
by gaal (Parson) on Dec 09, 2004 at 15:54 UTC | |
by gellyfish (Monsignor) on Dec 09, 2004 at 16:05 UTC | |
Re^3: How to de-reference a coderef?
by AndyH (Sexton) on Dec 09, 2004 at 15:57 UTC | |
by revdiablo (Prior) on Dec 09, 2004 at 17:51 UTC | |
by merlyn (Sage) on Dec 09, 2004 at 18:02 UTC | |
by Anonymous Monk on Dec 09, 2004 at 20:50 UTC | |
by merlyn (Sage) on Dec 10, 2004 at 00:06 UTC | |
by ikegami (Patriarch) on Dec 09, 2004 at 17:37 UTC |