in reply to Re: Module vs Singleton
in thread Module vs Singleton

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.