Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: How do I reference methods?

by RocketInABog (Initiate)
on Dec 23, 2008 at 12:45 UTC ( [id://732283]=note: print w/replies, xml ) Need Help??


in reply to How do I reference methods?

Though there are other interesting ways of getting a method reference, there already exists an equivalently straightforward way of doing this.

$ref = \&Class::method; $instance = new Class; $ref->( $instance, @args ); # - calls method of Class for the given i +nstance

Log In?
Username:
Password:

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

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

    No recent polls found