P is for Practical | |
PerlMonks |
Re: Object Constructors - Advice of experienced OO Perl Monksby izut (Chaplain) |
on Oct 06, 2005 at 11:52 UTC ( [id://497890]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|