Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: goto superclass method

by broquaint (Abbot)
on Dec 23, 2004 at 06:48 UTC ( #417009=note: print w/ replies, xml ) Need Help??


in reply to goto superclass method

You were almost there, just give that goto code dereference a code reference as produced by can e.g

sub dostuff { goto &{ $_[0]->can('SUPER::dostuff') } if $condition; # ... }
Sorry if this repeats what was said above but all those replies were making me cross-eyed.
HTH

_________
broquaint


Comment on Re: goto superclass method
Download Code
•Re^2: goto superclass method
by merlyn (Sage) on Dec 23, 2004 at 12:03 UTC
      Heaven forbid someone makes a mistake. {{{sigh}}}
Re^2: goto superclass method
by Aristotle (Chancellor) on Dec 26, 2004 at 18:44 UTC

    You don't need the curlies there. It will work just fine without them:

    goto $_[0]->can( 'SUPER::dostuff' );

    Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2015-07-06 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (69 votes), past polls