in reply to Building modules, my mental block
You don't have to, but when building "Object Oriented" modules, use a constuctor:
And chromatic is spot on ... you are not removing the package name from your method argument list.use strict; use warnings; my $auth = Mymodules::Auth->new(); $auth->auth('foo', 'bar'); package Mymodules::Auth; sub new { my $class = shift; my $self = {}; return bless $self, $class; } sub auth { my ($self,$user,$pass); ... }
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|