Subject: | Don't validate big arrays of string |
perl 5.14.2
Ubuntu 12.04
################################
use strict;
use warnings;
use MooseX::Params::Validate;
my @values = ();
for( my $i = 0; $i < 1000 ; $i ++){
push @values , 'test';
}
test(\@values);
@values = ();
for( my $i = 0; $i < 100 ; $i ++){
push @values , 'test';
}
test(\@values);
sub test{
my ( $event ) = pos_validated_list(\@_,
{ isa => 'ArrayRef[Str]' },
);
unless( defined($event) ){
print "Fail!\n";
}else{
print "Success!\n";
}
}
=============================
Fale!
Success!
Subject: | test.pl |
use strict;
use warnings;
use MooseX::Params::Validate;
my @values = ();
for( my $i = 0; $i < 1000 ; $i ++){
push @values , 'test';
}
test(\@values);
@values = ();
for( my $i = 0; $i < 100 ; $i ++){
push @values , 'test';
}
test(\@values);
sub test{
my ( $event ) = pos_validated_list(\@_,
{ isa => 'ArrayRef[Str]' },
);
unless( defined($event) ){
print "Fail!\n";
}else{
print "Success!\n";
}
}