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

Re: How do you determine if a user-defined function exists?

by ikegami (Patriarch)
on Nov 29, 2004 at 23:44 UTC ( [id://411071]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    UNIVERSAL::can(__PACKAGE__, 'myfunc')
    
  2. or download this
    UNIVERSAL::can($pkg, 'myfunc')
    
  3. or download this
    sub check_for_func {
       my ($func_name) = @_;
    ...
    }
    
    print(join(', ', check_for_func('test')), $/);
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-04-19 12:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found