Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 taking refuge in the Monastery: (6)
As of 2014-09-01 19:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (16 votes), past polls