Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: perl oo

by ichimunki (Priest)
on Jan 15, 2001 at 23:30 UTC ( [id://52016]=note: print w/replies, xml ) Need Help??


in reply to perl oo

The first argument in @_ is the package/class name. use my $class = shift; to strip that, then use bless ($self, $class); just for kicks.

Added: just as a note, I strongly recommend reading merlyn's incredibly straightforward "perlboot" document (found in Perl 5.6+ by typing perldoc perlboot, found in every up-to-date perldoc online compendium, like this one). This is simply the shortest, sweetest intro to Perl OO that you will ever find. Even if you are not new to OO, this document will take you through examples of the classic OO usages in Perl.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-26 05:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found