in reply to Self creating OO Module field accessors...
Avoiding direct eye-contact with your question momentarily, I point out that
is very bad. It makes subclassing BigThing very difficult.package BigThing; sub new { shift; bless $self, "BigThing";
It even makes code re-use by cut-and-paste more painful than it needs to be.
The constructor is passed the class name; it may as well use it:
package BigThing; sub new { my $class = shift; bless $self, $class;
We're building the house of the future together.
|
---|
In Section
Seekers of Perl Wisdom