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

Answer: How do I reference methods?

( #106216=categorized answer: print w/ replies, xml ) Need Help??

Q&A > object-oriented programming > How do I reference methods? - Answer contributed by ariels

See my note on pointers to member functions.

That code lets you say:

use PMF; my $p = PMF->new('print'); $p->$o(123); # Call $o->print(123) $p->$x('a','b'); # Call $x->print('a','b') $p->$z(); # Call $z->print

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2016-07-02 06:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (19 votes). Check out past polls.