X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FUtil.pm;h=c3f1f39f01728e90017e6f9ee7dabeaa074e76eb;hp=a226e1e30c44dd57e25f6ac220ef1803a0c73733;hb=b4d1723ead47f05198e369a2d38ba9e4a3a59354;hpb=8aba926dbf11e9cf418c7c79b925d15e60e1e990 diff --git a/lib/Mouse/Util.pm b/lib/Mouse/Util.pm index a226e1e..c3f1f39 100644 --- a/lib/Mouse/Util.pm +++ b/lib/Mouse/Util.pm @@ -38,7 +38,7 @@ BEGIN{ # Because Mouse::Util is loaded first in all the Mouse sub-modules, # XS loader is placed here, not in Mouse.pm. - our $VERSION = '0.40_07'; + our $VERSION = '0.40_08'; my $xs = !(exists $INC{'Mouse/PurePerl.pm'} || $ENV{MOUSE_PUREPERL}); @@ -52,6 +52,9 @@ BEGIN{ $xs = eval sprintf("#line %d %s\n", __LINE__, $hack_mouse_file) . q{ require XSLoader; XSLoader::load('Mouse', $VERSION); + + *Mouse::Meta::Method::Constructor::XS::meta = \&meta; + *Mouse::Meta::Method::Destructor::XS::meta = \&meta; }; #warn $@ if $@; } @@ -60,7 +63,7 @@ BEGIN{ require 'Mouse/PurePerl.pm'; # we don't want to create its namespace } - *_MOUSE_XS = sub(){ $xs }; + *MOUSE_XS = sub(){ $xs }; } @@ -85,6 +88,8 @@ BEGIN { generate_isa_predicate_for('Mouse::Meta::Role' => 'is_a_metarole'); } +our $in_global_destruction = 0; +END{ $in_global_destruction = 1 } # Moose::Util compatible utilities @@ -269,7 +274,7 @@ sub apply_all_roles { load_class($role_name); is_a_metarole( get_metaclass_by_name($role_name) ) - || $applicant->meta->throw_error("You can only consume roles, $role_name(".$role_name->meta.") is not a Mouse role"); + || $applicant->meta->throw_error("You can only consume roles, $role_name is not a Mouse role"); } if ( scalar @roles == 1 ) { @@ -337,7 +342,7 @@ Mouse::Util - Features, with or without their dependencies =head1 VERSION -This document describes Mouse version 0.40_07 +This document describes Mouse version 0.40_08 =head1 IMPLEMENTATIONS FOR