http://qs1969.pair.com?node_id=443582


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:
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'};
For me, this test correctly prints "not defined" and "glob exists" but shouldn't it also print "declared" and "exists?"

Thanks for any insight you can give me on this.

Best,
Mike