Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: chaining method calls

by adrianh (Chancellor)
on Jun 12, 2003 at 10:16 UTC ( #265327=note: print w/replies, xml ) Need Help??


in reply to Re: chaining method calls
in thread chaining method calls

If it's a method that is intended to return a boolean result then I would return a boolean. I only use chaining on methods that don't return a result.

If a false result is intended to indicate an error, I would throw an exception instead - so I wouldn't need to store $result.

For the style of code I write this problem wouldn't be an issue.

(also, the $object=undef is redundant. It would be collected at the end of scope regardless.)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://265327]
help
Chatterbox?
[Discipulus]: how I can tell in which perl version was included List::Util 1.29 ?
[Discipulus]: to specify use 5.0.x to be sure to have pairmap from the module..

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2017-05-25 09:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?