Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^4: accessing stashes

by ikegami (Patriarch)
on Mar 01, 2019 at 19:52 UTC ( [id://1230735]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub get_code_ref_by_fqn {  # Fully qualified name
       my ($fqn) = @_;
    ...
       return undef if ref(\$glob_or_code) ne 'GLOB';
       return *$glob_or_code{CODE};
    }
    
  2. or download this
    sub get_code_ref_by_fqn {  # Fully qualified name
       my ($fqn) = @_;
    ...
       return undef if !defined(&$fqn);
       return \&$fqn;
    }
    
  3. or download this
    use 5.012;
    use warnings;
    ...
    say get_code_ref_by_fqn('Foo::Bar::x') // '[undef]';
    say get_code_ref_by_fqn('Foo::Bar::y') // '[undef]';
    say get_code_ref_by_fqn('Foo::Bar::z') // '[undef]';
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-04-25 07:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found