Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Self creating OO Module field accessors...

by jdporter (Paladin)
on Jan 12, 2006 at 22:32 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-03-29 12:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found