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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.