X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=benchmarks%2Ftype_constraints2.pl;fp=benchmarks%2Ftype_constraints2.pl;h=688360a32d21c4c77a7b73c835fe05c66ba04d89;hb=a965b6da59987429b38cfcb1274d87c57f3f1e8b;hp=b00fcbff3f1c9e1c28a3f7479987fe1e474b91d0;hpb=6fe3047524c6d3d68daedb8243d009015eb4b17c;p=gitmo%2FMoose.git diff --git a/benchmarks/type_constraints2.pl b/benchmarks/type_constraints2.pl index b00fcbf..688360a 100644 --- a/benchmarks/type_constraints2.pl +++ b/benchmarks/type_constraints2.pl @@ -91,6 +91,8 @@ my %strs = map { $_ => $_ } @ints; my %fhs = map { $_ => $_ } @fhs; my %objects = map { $_ => $_ } @objects; +my $thing = Thing->new; + timethese( 200_00, { constructor => sub { @@ -110,8 +112,6 @@ timethese( ); }, accessors => sub { - my $thing = Thing->new; - $thing->int( $ints[0] ); $thing->str( $strs[0] ); $thing->fh( $fhs[0] );