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

Re^3: How to identify the package of a subroutine given only a reference to it

by choroba (Cardinal)
on Feb 01, 2022 at 00:11 UTC ( [id://11141004]=note: print w/replies, xml ) Need Help??


in reply to Re^2: How to identify the package of a subroutine given only a reference to it
in thread How to identify the package of a subroutine given only a reference to it

But beware!

#!/usr/bin/perl use warnings; use strict; { package Local; sub My::frob { print __PACKAGE__ } } My::frob(); # Local

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-16 11:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found