in reply to What CODE typeglob slot is my anonymous sub in?
I'm not sure if this is what you're looking for but I've found this tip from "Perl Hacks" useful on many occasions.
perl -MCarp -e ' my $sub = sub { local *__ANON__ = "Some::Sub"; Carp::cluck "clucks when called"; }; $sub->(); '
It won't help with you're aliasing problem but then you're probably just better of generating two subs identical except for their $__ANON__.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: What CODE typeglob slot is my anonymous sub in?
by Ovid (Cardinal) on Apr 26, 2007 at 05:46 UTC |