Just wanted to clarify this–
package Foo; sub new {} # Foo::new, Foo->new
Those calls to new are not equivalent–
~>perl -lwe 'BEGIN{ package Foo; sub new { print shift } } Foo->new; F +oo::new' Foo Use of uninitialized value in print at -e line 1.
In reply to Re^2: Module vs Singleton
by Your Mother
in thread Module vs Singleton
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |