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

Re: Return $self, but what if I don't wanna?

by chuckbutler (Prior)
on Mar 10, 2010 at 03:19 UTC ( #827679=note: print w/replies, xml ) Need Help??


in reply to Return $self, but what if I don't wanna?

Return a value that is appropriate, logical, and will further the task that you wish to complete.

If you are updating the data of the object, you should always be sure if there is an error, report if back to the caller of the method. This may involve a convention with the return value, ie: returning undef -or- zero and setting $! to something pithy and relevant, or terminating using croak with a descriptive message.

Good luck, -c

  • Comment on Re: Return $self, but what if I don't wanna?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://827679]
help
Chatterbox?
[virtualsue]: 1nickt thatch repair just finishing
[virtualsue]: they've done enough to get it through winter
holli loves lightning talks
[1nickt]: ... but not the last straw?
1nickt ducks

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2017-11-21 12:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (299 votes). Check out past polls.

    Notices?