![]() |
|
No such thing as a small change | |
PerlMonks |
Re: accessing stashesby choroba (Cardinal) |
on Mar 01, 2019 at 17:11 UTC ( #1230722=note: print w/replies, xml ) | Need Help?? |
You can do that with the symbol table, but using defined and exists is cleaner.
Update: added the first paragraph of says. Update 2: Interestingly, a forward declared sub with prototypes returns the prototypes with the first syntax:
Update 3: ... unless you add an attribute, too, which makes it output the glob name.
Update 4: The -1 is printed only if you remove all other mentions of My::three, otherwise *My::three is printed.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom
|
|