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

Re^2: How can I tell if a function has been forward declared but not yet defined?

by ihb (Deacon)
on Mar 30, 2005 at 21:36 UTC ( [id://443614]=note: print w/replies, xml ) Need Help??


in reply to Re: How can I tell if a function has been forward declared but not yet defined?
in thread How can I tell if a function has been forward declared but not yet defined?

The subroutine &hello doesn't exist. In fact $::{hello} is &hello's prototype (as a plain string). There's no CV or CV-ish value around yet--just a plain string being the prototype. When you do *hello, \&hello or $hello you create the glob at comile-time and so $::{hello} returns a glob. This means that

sub hello; *fh = $::{hello}; *hello;
works. See Re^3: Grabbing Variable Names for an elaboration.

ihb

See perltoc if you don't know which perldoc to read!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-24 23:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found