Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^9: accessing stashes

by ikegami (Pope)
on Mar 01, 2019 at 20:46 UTC ( #1230740=note: print w/replies, xml ) Need Help??


in reply to Re^8: accessing stashes
in thread accessing stashes

You can't check if the glob contains a code reference before you make sure you have a glob in the first place!

But this is all moot. This solution doesn't work as of Perl 5.22. You should be using one of the solutions that work in 5.22 and beyond. See Re^4: accessing stashes

Replies are listed 'Best First'.
Re^10: accessing stashes
by morgon (Priest) on Mar 01, 2019 at 20:55 UTC
    But it's a good point.

    I did not realize (even though it's kind of logical when you think about it) that first you need to check if the stash exists at all and only then you can examine the code-slot...

    But many thanks.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2021-10-21 19:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (83 votes). Check out past polls.

    Notices?