Hi,
in the paper "The Singleton Design Pattern" by b. d. foy [The Perl
Review (0,1) p.19] the constructor
(listing 1, line 12) says
>> $singleton = bless \$self, $class; <<
i.e. it uses the reference to $self whereas in other documentation I
always find
>> bless $self, $class; <<
i.e. $self is used directly.
Is the reference to $self necessary just because of the singleton property?
Is it/should it be used generally?
Is the second form of the bless "better"?
What is the reason for the different uses?
--
Regards,
K. Jantzen.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>