kosta has asked for the wisdom of the Perl Monks concerning the following question:
I use it in my scripts like this:sub passwd { my $cleartext_pass=$_[0]; my $ppr = Authen::Passphrase::MD5Crypt->new( salt_random => 1, passphrase => $cleartext_pass); my $passwdo = $ppr->as_crypt; return $passwdo; }
Now the problem is when I run the function alone (not from the module) with a string like this: my $test=passwd('hi');my $rela ... #This is the module that is "multi-level" and the DB part + has passwd function in it ... if (param('pass') == param ('pass_again')) { my $pass_clear=param('pass'); my $password=$rela->passwd($pass_clear); $rela->do('INSERT INTO uzivatele (jmeno,prijmeni,heslo,login,s +tav_uctu,skupina,vytvoren) VALUES (?, ?, ?, ?, 2, \'user\', CURRENT_T +IMESTAMP)', param('jmeno'), param('prijmeni'), $password, param('logi +n'));
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: annoying HASH (0xsomething)
by Anonyrnous Monk (Hermit) on Jan 18, 2011 at 14:05 UTC | |
by kosta (Sexton) on Jan 18, 2011 at 14:39 UTC | |
by oko1 (Deacon) on Jan 18, 2011 at 15:46 UTC | |
|
Re: annoying HASH (0xsomething)
by chromatic (Archbishop) on Jan 18, 2011 at 19:03 UTC |