Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: recursive anonymous subroutines

by TedYoung (Deacon)
on Apr 06, 2006 at 20:19 UTC ( #541720=note: print w/ replies, xml ) Need Help??


in reply to Re^2: recursive anonymous subroutines
in thread recursive anonymous subroutines

OK, I found a way, but you won't like it! :-)
Use $DB::sub->() but you have to run it under the perl debuger (perl -d):

sub { print 'A'; $DB::sub->() }->();

Ted Young

($$<<$$=>$$<=>$$<=$$>>$$) always returns 1. :-)


Comment on Re^3: recursive anonymous subroutines
Select or Download Code
Re^4: recursive anonymous subroutines
by diotalevi (Canon) on Apr 06, 2006 at 20:52 UTC

    That only works when the debugger is enabled. For general use, see Devel::Caller.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://541720]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2015-07-04 19:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls