Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: How do YOU do OO in Perl?

by PodMaster (Abbot)
on Oct 07, 2003 at 13:30 UTC ( #297282=note: print w/ replies, xml ) Need Help??


in reply to Re: How do YOU do OO in Perl?
in thread How do YOU do OO in Perl?

s'$self->{$pkg} = {};'$self->{ + __PACKAGE__ } = {};';
update: but it's not prettier ;)(1 teenie-weenie + versus another variable? come on)

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.


Comment on Re: Re: How do YOU do OO in Perl?
Download Code
Replies are listed 'Best First'.
Re: Re: Re: How do YOU do OO in Perl?
by vadim_t (Acolyte) on Oct 07, 2003 at 13:57 UTC
    $pkg is the same as __PACKAGE__, look above. I just use $pkg to make it shorter and prettier.
Re^3: How do YOU do OO in Perl?
by Aristotle (Chancellor) on Oct 10, 2003 at 00:20 UTC
    I'd prefer $self->{(__PACKAGE__)}. One more character, but it doesn't look so noisy.

    Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2015-07-31 19:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (280 votes), past polls