App-Genpass
view release on metacpan or search on metacpan
t/03-generate_chars.t view on Meta::CPAN
sub test_types {
my ( $app, @types ) = @_;
my $attempts = 10;
my @passwords = $app->generate($attempts);
foreach my $pass (@passwords) {
my @pass = split //, $pass;
my %appear = ();
#use Data::Dumper; print Dumper \@pass;
foreach my $type (@types) {
my @type_chars = @{ $app->$type };
foreach my $type_char (@type_chars) {
if ( any { $_ eq $type_char } @pass ) {
$appear{$type}++;
last;
}
};
}
( run in 0.263 second using v1.01-cache-2.11-cpan-4d50c553e7e )