Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: symbolic reference + inheritance

by merlyn (Sage)
on Sep 26, 2009 at 16:06 UTC ( #797705=note: print w/replies, xml ) Need Help??


in reply to Re^3: symbolic reference + inheritance
in thread symbolic reference + inheritance

Sure. You can do either of:
my $meth = $pack->can("${method}2"); $pack->$meth(@args);
or more simply, if you can give the object twice:
$pack->can("${method}2")->($pack, @args);

-- Randal L. Schwartz, Perl hacker

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://797705]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2018-07-16 03:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (330 votes). Check out past polls.

    Notices?