Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re:{3} Strict, strings and subroutines

by merlyn (Sage)
on Oct 10, 2001 at 19:45 UTC ( #118021=note: print w/replies, xml ) Need Help??


in reply to Re:{3} Strict, strings and subroutines
in thread Strict, strings and subroutines

BEGIN { my %cache; sub do_it { my $func = shift; $cache{$func} = do { local @ISA; __PACKAGE__->can("do_$fun") } unless defined $cache{$func}; $cache{$func}->(@_); } }
This does precisely what mine does. Did you mean "exists" there instead of "defined"?

-- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://118021]
help
Chatterbox?
[erix]: oh, I see... it's pretty obvious really
[choroba]: What do you mean by "anchors"?
[erix]: anchors
[erix]: I have figured it out. I actually constructed them correctly but used a faulty url *headdesk*
[erix]: ( you use anchors to jump to via a #-suffix to the url -- I am sure you know )

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2018-06-19 12:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (113 votes). Check out past polls.

    Notices?