Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^5: goto superclass method

by Ovid (Cardinal)
on Dec 22, 2004 at 22:19 UTC ( [id://416931]=note: print w/replies, xml ) Need Help??


in reply to Re^4: goto superclass method
in thread goto superclass method

I guess in this case it would be preferable to call call can as a method and let the code die and then worry about what to do if it fails. That's probably better than my silently failing or doing the wrong thing because of an overridden can.

Cheers,
Ovid

New address of my CGI Course.

Replies are listed 'Best First'.
Re^6: goto superclass method
by Aristotle (Chancellor) on Dec 22, 2004 at 22:37 UTC

    My thinking is that if a superclass has overriden can(), then they have good reason to, so in a situation where you know you have a blessed ref or a package name, you should prefer calling it as a method. I only use UNIVERSAL::can directly when I'm unsure about that.

    Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-25 19:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found