From: gfx Date: Thu, 26 Nov 2009 12:31:31 +0000 (+0900) Subject: Add a constant, MOUSE_XS X-Git-Tag: 0.40_08~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ecd4a12530a65e66380592ce15af81550af34381;p=gitmo%2FMouse.git Add a constant, MOUSE_XS --- diff --git a/lib/Mouse/Meta/Module.pm b/lib/Mouse/Meta/Module.pm index 793de9b..17f33f8 100755 --- a/lib/Mouse/Meta/Module.pm +++ b/lib/Mouse/Meta/Module.pm @@ -7,7 +7,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 eb0463f..eea5f73 100644 --- a/lib/Mouse/Util.pm +++ b/lib/Mouse/Util.pm @@ -63,7 +63,7 @@ BEGIN{ require 'Mouse/PurePerl.pm'; # we don't want to create its namespace } - *_MOUSE_XS = sub(){ $xs }; + *MOUSE_XS = sub(){ $xs }; } diff --git a/t/001_mouse/603-mouse-pureperl.t b/t/001_mouse/603-mouse-pureperl.t index 8877042..55ec983 100644 --- a/t/001_mouse/603-mouse-pureperl.t +++ b/t/001_mouse/603-mouse-pureperl.t @@ -7,5 +7,5 @@ use Test::More tests => 1; use Mouse::PurePerl; use Mouse; -ok !Mouse::Util::_MOUSE_XS, 'load Mouse::PurePerl'; +ok !Mouse::Util::MOUSE_XS, 'load Mouse::PurePerl';