mab has asked for the wisdom of the Perl Monks concerning the following question:
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'};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How can I tell if a function has been forward declared but not yet defined?
by dragonchild (Archbishop) on Mar 30, 2005 at 20:17 UTC | |
by ihb (Deacon) on Mar 30, 2005 at 21:36 UTC | |
by mab (Acolyte) on Mar 30, 2005 at 20:31 UTC | |
by mab (Acolyte) on Mar 30, 2005 at 20:59 UTC | |
|
Re: How can I tell if a function has been forward declared but not yet defined?
by ihb (Deacon) on Mar 30, 2005 at 21:31 UTC | |
by mab (Acolyte) on Mar 30, 2005 at 21:35 UTC |