in reply to annoying HASH (0xsomething)
When you call a sub as a method, such as $obj->passwd(...), the first parameter being passed to the method is a (blessed) reference to the object instance (often assigned to a variable $self within the method). This is what stringifies as My::Module = HASH(0x2ab7df04ba50) in your case.
$rela->passwd($pass_clear); # passes two arguments: objref, pass +_clear My::Module::passwd($pass_clear); # passes one argument: pass_clear
You should decide whether you want a method or a regular subroutine. A method makes sense, if you need access to the object's instance data within the method — which doesn't seem to be the case with your passwd routine.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: annoying HASH (0xsomething)
by kosta (Sexton) on Jan 18, 2011 at 14:39 UTC | |
by oko1 (Deacon) on Jan 18, 2011 at 15:46 UTC |