From: Andrew Rodland Date: Thu, 11 Nov 2010 02:42:13 +0000 (-0600) Subject: Make bench require XSAccessor to fix blowups when it's not there X-Git-Tag: 0.009001~38 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=642c5e75af48fddb2198a5619e859c2ee6057180;p=gitmo%2FRole-Tiny.git Make bench require XSAccessor to fix blowups when it's not there Also make sure that Method::Generate::Accessor really thinks it can do XS. --- diff --git a/benchmark/object_factory b/benchmark/object_factory index ed83479..dae129d 100644 --- a/benchmark/object_factory +++ b/benchmark/object_factory @@ -24,6 +24,7 @@ BEGIN { Moo Mouse Mousse + Class::XSAccessor /) { eval "require $_" or push @missing, $_; } @@ -57,10 +58,12 @@ if ($opts->{bench} =~ /all|pp/) { } if ($opts->{bench} =~ /all|xs/) { + if (! $Method::Generate::Accessor::CAN_HAZ_XS) { - local $Method::Generate::Accessor::CAN_HAZ_XS = 1; - _add_moosey_has (moo_XS => 'Moo'); + die "Requested XS benchmarks but XS isn't available in Method::Generate::Accessor"; } + + _add_moosey_has (moo_XS => 'Moo'); _add_moosey_has (mouse_XS => 'Mouse') }