Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re (tilly) 2: Pointers to member functions

by tilly (Archbishop)
on Aug 20, 2001 at 23:29 UTC ( #106328=note: print w/ replies, xml ) Need Help??

in reply to Re: Pointers to member functions
in thread Pointers to member functions

Also note that using a function reference with the method syntax works just fine. Consider the following example where an unnamed method is called from an object in a class with no methods of its own:

my $foo = bless {}, "bar"; my $meth = sub {shift; print shift}; $foo->$meth("Sneaky");
(Yeah, I know you know that, but others might find it neat.)

Comment on Re (tilly) 2: Pointers to member functions
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (13)
As of 2015-12-01 18:55 GMT
Find Nodes?
    Voting Booth?

    My keyboard shows this many letters:

    Results (25 votes), past polls