X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FUtil.pm;h=34f6eeebd57cf726f9fcbfbd2478aff2d713dcbb;hp=cf26fe3cd6bad1b0881bcff91c4a60bbb2f2f840;hb=ba153b332782dce8bf44fcc78ebb7230002b950c;hpb=6e168432fa69bbe87ff0dd12e355a8b5d99a1a9c diff --git a/lib/Mouse/Util.pm b/lib/Mouse/Util.pm index cf26fe3..34f6eee 100644 --- a/lib/Mouse/Util.pm +++ b/lib/Mouse/Util.pm @@ -1,11 +1,13 @@ package Mouse::Util; use Mouse::Exporter; # enables strict and warnings +sub get_linear_isa($;$); # must be here + 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_05'; + our $VERSION = '0.40_06'; my $xs = !(exists $INC{'Mouse/PurePerl.pm'} || $ENV{MOUSE_PUREPERL}); @@ -116,7 +118,7 @@ BEGIN { } else { # VVVVV CODE TAKEN FROM MRO::COMPAT VVVVV my $_get_linear_isa_dfs; # this recurses so it isn't pretty - $_get_linear_isa_dfs = sub { + $_get_linear_isa_dfs = sub ($;$){ no strict 'refs'; my $classname = shift; @@ -138,8 +140,6 @@ BEGIN { } } - - no warnings 'once'; *get_linear_isa = $get_linear_isa; } @@ -183,7 +183,7 @@ sub is_valid_class_name { return 0 if ref($class); return 0 unless defined($class); - return 1 if $class =~ /^\w+(?:::\w+)*$/; + return 1 if $class =~ /\A \w+ (?: :: \w+ )* \z/xms; return 0; } @@ -336,7 +336,7 @@ Mouse::Util - Features, with or without their dependencies =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 IMPLEMENTATIONS FOR