in reply to Re: Object singleton method
in thread Object singleton method
Thank you, nice article.
All the examples for singleton point to class methods and not instance ones. I wanted something like:
my $obj1 = Class->new; my $obj2 = Class->new; # definition of singleton method for $obj1 goes here ... $obj1->singleton_method and print "It works.\n"; $obj2->singleton_method and print "It doesn't work.\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Object singleton method
by Corion (Patriarch) on Apr 22, 2008 at 08:00 UTC | |
Re^3: Object singleton method
by brian_d_foy (Abbot) on Apr 22, 2008 at 16:36 UTC | |
by Arunbear (Prior) on Apr 22, 2008 at 21:35 UTC |
In Section
Seekers of Perl Wisdom