in reply to Ruby: An Abbot breaks silencewind
While I think Perl's OO is rotten to the core, I don't
agree that making singletons in Perl is difficult. You
certainly don't need the convoluted code you showed!
package Logger; { my $instance; sub instance { return $instance if $instance; my $class = shift; $instance = bless {@_} => $class; } }
-- Abigail
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Ruby: An Abbot breaks silencewind
by coreolyn (Parson) on Jun 11, 2001 at 14:33 UTC | |
Re: Re: Ruby: An Abbot breaks silencewind
by gildir (Pilgrim) on Jun 11, 2001 at 12:17 UTC | |
by coreolyn (Parson) on Jun 11, 2001 at 14:54 UTC | |
by gildir (Pilgrim) on Jun 11, 2001 at 18:59 UTC | |
by tilly (Archbishop) on Jun 11, 2001 at 19:56 UTC |
In Section
Meditations