Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Should a constructor ever return undef?

by IlyaM (Parson)
on Jul 11, 2003 at 08:41 UTC ( #273289=note: print w/ replies, xml ) Need Help??


in reply to Should a constructor ever return undef?

Perl as OOP language is much more flexiable language than C++ and there is no really reason to not use this flexibility when it makes sence. Return under (or any other special value) or raising an exception as a sign of error is really just a matter of style. Best Practices for Exception Handling covers it so you may find it interesting.

--
Ilya Martynov, ilya@iponweb.net
CTO IPonWEB (UK) Ltd
Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net
Personal website - http://martynov.org


Comment on Re: Should a constructor ever return undef?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2014-12-20 05:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls