Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Re: Code references as use() parameters

by MarkM (Curate)
on Apr 09, 2003 at 17:04 UTC ( #249305=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Code references as use() parameters
in thread Code references as use() parameters

I think I was clear that in the general case, as long as the subroutine is not invoked as part of the 'use', there is no problem. If the subroutine is invoked, then it needs to have already been defined. Only taking the reference of an as-yet-non-existent subroutine is not dangerous.

Actually, there is one danger, and it has to do with prototypes. If the prototypes differ (when the function actually is defined), Perl will croak.


Comment on Re: Re: Re: Code references as use() parameters

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2015-07-29 03:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls