in reply to Re: Grabbing Variable Names
in thread Grabbing Variable Names
Hi,
I'm very interested in your comments about determining if a function has been forward declared but not yet loaded, e.g., when using AutoLoader. For some reason, though, I can't get this to work. Here's my test case:
Thanks for any insight you can give me on this.
Best,
Mike
I'm very interested in your comments about determining if a function has been forward declared but not yet loaded, e.g., when using AutoLoader. For some reason, though, I can't get this to work. Here's my test case:
For me, this test correctly prints "not defined" and "glob exists" but shouldn't it also print "declared" and "exists?"sub hello; *fn = $::{'hello'}; print "declared\n" if *fn{CODE}; print "not defined\n" if ! defined &fn; print "exists\n" if exists &fn; print "glob exists\n" if exists $::{'hello'};
Thanks for any insight you can give me on this.
Best,
Mike
In Section
Seekers of Perl Wisdom