Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^4: accessing stashes

by morgon (Priest)
on Mar 01, 2019 at 19:25 UTC ( #1230730=note: print w/replies, xml ) Need Help??


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

This is *exactly* what I was looking for - would you be so kind to rewrite my script above with your syntax (am interested in package "main") as I seem to be too drunk to do it myself and my attempts don't compile...

Replies are listed 'Best First'.
Re^5: accessing stashes
by ikegami (Pope) on Mar 01, 2019 at 19:28 UTC

    Main is %:: (or %main:: (or %main::main:: (...))) instead of %My::.

      I know that.

      But I want one expression to determine the condition, I want to avoid (for reasons of pure idiocy) to have an extra assignment...

      So something like

      print defined *main::{$symbol}->*{CODE} ? "yep": "nope";
      But I cannot do it...

        It's $glob && *$glob{CODE}, not defined *main::{$symbol}->*{CODE}.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2020-05-30 13:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (172 votes). Check out past polls.

    Notices?