From: gfx Date: Sat, 19 Dec 2009 08:31:54 +0000 (+0900) Subject: Tweaks for 5.6.2 X-Git-Tag: 0.45^0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7981773182f79827fa4b8fb228c159381525c060;p=gitmo%2FMouse.git Tweaks for 5.6.2 --- diff --git a/lib/Mouse/Meta/Module.pm b/lib/Mouse/Meta/Module.pm index 1c5175a..0700ec3 100755 --- a/lib/Mouse/Meta/Module.pm +++ b/lib/Mouse/Meta/Module.pm @@ -6,8 +6,7 @@ use Scalar::Util (); my %METAS; -# XXX: work around a warning "useless use of a constant in void context" in 5.6.2 -if(&Mouse::Util::MOUSE_XS){ +if(Mouse::Util::MOUSE_XS){ # register meta storage for performance Mouse::Util::__register_metaclass_storage(\%METAS, 0); diff --git a/lib/Mouse/Util.pm b/lib/Mouse/Util.pm index 4b59034..e94ca84 100644 --- a/lib/Mouse/Util.pm +++ b/lib/Mouse/Util.pm @@ -54,7 +54,7 @@ BEGIN{ Mouse::Util->import({ into => 'Mouse::Meta::Method::Destructor::XS' }, ':meta'); Mouse::Util->import({ into => 'Mouse::Meta::Method::Accessor::XS' }, ':meta'); return 1; - }; + } || 0; #warn $@ if $@; } diff --git a/t/001_mouse/014-build.t b/t/001_mouse/014-build.t index 0eaff90..b1e3293 100644 --- a/t/001_mouse/014-build.t +++ b/t/001_mouse/014-build.t @@ -37,7 +37,7 @@ do { is_deeply([splice @called], [], "no BUILD calls yet"); -with_immutable { +with_immutable sub { my $object = Class->new; ok defined($object), $object->meta->is_immutable() ? 'mutable' : 'immutable'; @@ -51,5 +51,5 @@ with_immutable { $child->BUILDALL({}); is_deeply([splice @called], ["Class::BUILD", "Child::BUILD"], 'BUILDALL'); -} qw(Class Child); +}, qw(Class Child); diff --git a/t/001_mouse/015-demolish.t b/t/001_mouse/015-demolish.t index 4fad8c6..486d471 100644 --- a/t/001_mouse/015-demolish.t +++ b/t/001_mouse/015-demolish.t @@ -37,7 +37,7 @@ do { is_deeply([splice @called], [], "no DEMOLISH calls yet"); -with_immutable { +with_immutable sub { ok(Class->meta, Class->meta->is_immutable ? 'mutable' : 'immutable'); { @@ -64,4 +64,4 @@ with_immutable { } is_deeply([splice @called], ['Child::DEMOLISH', 'Class::DEMOLISH'], 'DEMOLISHALL'); -} qw(Class Child); +}, qw(Class Child);