in reply to Re: Understanding and building modules
in thread Understanding and building modules
tosub auth { my ($uname, $passwd, $dbsecret, $salt); $uname = shift; $passwd = shift; ... }
or the method call will not work. Here is a little test script i came up with. Looks like the problem isn't in the constructor as i originally suspected, but instead in that wacky method call/instantiation.sub auth { my ($self, $uname, $passwd) = @_; my ($dbsecret, $salt); ... }
ref new Foo or warn "example 1 is not an object\n"; ref new Foo->foo or warn "example 2 is not an object\n"; package Foo; sub new { bless {} } sub foo { "foo" }
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)
|
|---|