Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Should a constructor ever return undef?

by IlyaM (Parson)
on Jul 11, 2003 at 08:41 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://273289]
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found