Crypt-SaltedHash

 view release on metacpan or  search on metacpan

t/bug-localize-regex-vars.t  view on Meta::CPAN

use strict;
use warnings;

use Test::More;
use Crypt::SaltedHash;
use Test::Fatal;

my $string = "+++linux";
$string =~ m/[+]*(.*)/;

is $1, 'linux', '$1 set to "linux"';

my $stored_password = '$PBKDF2$HMACSHA1:1000:bHV4ZW1idXJna0tB4/Lo9MtMLaGHOtY9ig==$sUKYw9mZ66E8fLL2w01Rq2EotiY=';
my $password = 'somepw';

my $return;
my $lives = exception { $return = Crypt::SaltedHash->validate( $stored_password, $password, undef ) };

is $lives,  undef, 'validate() lived even through non-match and $1 already set!';
ok !$return, 'validate() returns false properly';

done_testing;



( run in 0.767 second using v1.01-cache-2.11-cpan-54e63673c56 )