It makes your constructor slightly more flexible. It means that as well as calling it as a class method:
my $foo = SomeClass->new;
You can also call it as an object method:
my $bar = $foo->new;
In general, I'd say that this isn't a good idea. If I want a constructor that can be called as an object method then I'll create a different constructor method with a different (and more meaningful) name - perhaps something like 'clone'.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: Syntactic Question
by davorg
in thread Two argument bless syntax
by logie17
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |