X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=benchmarks%2Faccessors.pl;h=67a1cb2aa71548791074c9ac7e58192b30e38aab;hp=68ceffe0f01353beea0f558ceadca259d229e664;hb=4aaed9e5cc435a2085e46f4c98a3abc233ecacaf;hpb=53e42eacd228e35e5a0d9cf1b616e9de3579e302 diff --git a/benchmarks/accessors.pl b/benchmarks/accessors.pl index 68ceffe..67a1cb2 100644 --- a/benchmarks/accessors.pl +++ b/benchmarks/accessors.pl @@ -32,16 +32,6 @@ my $cxsa_is_loaded = eval q{ lazy => 1, default => 42, ); - has with_tc => ( - is => 'rw', - isa => 'Int', - ); - - has with_tc_class_type => ( - is => 'rw', - isa => 'Foo', - ); - __PACKAGE__->meta->make_immutable; } { @@ -55,15 +45,6 @@ my $cxsa_is_loaded = eval q{ lazy => 1, default => 42, ); - has with_tc => ( - is => 'rw', - isa => 'Int', - ); - has with_tc_class_type => ( - is => 'rw', - isa => 'Foo', - ); - __PACKAGE__->meta->make_immutable; } @@ -139,40 +120,3 @@ cmpthese -1 => { }, ) : (), }; - -print "\nSETTING for attributes with type constraints 'Int' (except for C::XSAccessor)\n"; -cmpthese -1 => { - 'Mouse' => sub{ - $mi->with_tc(10); - $mi->with_tc(10); - }, - 'Moose' => sub{ - $mx->with_tc(10); - $mx->with_tc(10); - }, - $cxsa_is_loaded ? ( - 'C::XSAccessor' => sub{ - $cx->simple(10); - $cx->simple(10); - }, - ) : (), -}; - -print "\nSETTING for attributes with type constraints 'Foo' (except for C::XSAccessor)\n"; -my $foo = Foo->new; -cmpthese -1 => { - 'Mouse' => sub{ - $mi->with_tc_class_type($foo); - $mi->with_tc_class_type($foo); - }, - 'Moose' => sub{ - $mx->with_tc_class_type($foo); - $mx->with_tc_class_type($foo); - }, - $cxsa_is_loaded ? ( - 'C::XSAccessor' => sub{ - $cx->simple($foo); - $cx->simple($foo); - }, - ) : (), -};