Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Object Constructors - Advice of experienced OO Perl Monks

by izut (Chaplain)
on Oct 06, 2005 at 11:52 UTC ( #497890=note: print w/replies, xml ) Need Help??


in reply to Object Constructors - Advice of experienced OO Perl Monks

The class constructor is used to initialize the object, safely and completely, and can also be used to instantiate any compound objects you need to couple in your object. Besides that, I don't see anything you can't do on a constructor.

Update: After seeing your update, the difference from perltoot and WWW::Mechanize::new was the way its doing things. There are not a default idiom to construct your objects. You can do the way you feel comfortable to.


Igor S. Lopes - izut
surrender to perl. your code, your rules.
  • Comment on Re: Object Constructors - Advice of experienced OO Perl Monks

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2022-08-16 10:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?