Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Named anonymous subs

by Julian Mehnle (Initiate)
on Mar 08, 2006 at 02:35 UTC ( [id://535090]=note: print w/replies, xml ) Need Help??


in reply to Named anonymous subs

It seems you can even assign namespaced sub names to *__ANON__ and have it work:
$ perl <<EOF package Foo::Bar; print sub { local *__ANON__ = "boo"; (caller(0))[3] }->(); EOF Foo::Bar::boo $ perl <<EOF package Foo::Bar; print sub { local *__ANON__ = "Foo::Zip::boo"; (caller(0))[3] }->(); EOF Foo::Zip::boo

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-03-19 06:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found