Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: A first attempt.. at OO perl

by tinita (Parson)
on Jul 02, 2008 at 14:30 UTC ( [id://695139]=note: print w/replies, xml ) Need Help??


in reply to A first attempt.. at OO perl

sub new { my $self = [{},""]; bless($self); return $self; }
please never use the one-argument-form of bless. always bless into the $class you got as an argument to new. otherwise it's impossible to inherit from your class.
update: as rir /msgd me, of course you can inherit, but not from the constructor

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-03-29 05:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found