Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Self creating OO Module field accessors...

by jdporter (Chancellor)
on Jan 12, 2006 at 22:32 UTC ( #522826=note: print w/replies, xml ) Need Help??

in reply to Self creating OO Module field accessors...

Avoiding direct eye-contact with your question momentarily, I point out that

package BigThing; sub new { shift; bless $self, "BigThing";
is very bad. It makes subclassing BigThing very difficult.
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.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2022-05-28 07:58 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (98 votes). Check out past polls.