Your code should work as planned when called as Name::Name->new()
Class->method() works differently from Class::method only in that:
1) Class->method(@args) respects inheritance.
2) Class->method(@args) inserts "Class" as the first argument while Class::method() does not.
update: most people expect new() to be the constructor so it should return $self.
In reply to Re: Writing a Perl Module... problems
by Joost
in thread Writing a Perl Module... problems
by cosmicperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |