From: Jesse Luehrs Date: Tue, 6 Sep 2011 03:21:10 +0000 (-0500) Subject: handle this in package::stash X-Git-Tag: 2.0300~84 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a77d943b2fc2b6e3e6eff2cd130ae5fc0ef70ed5;p=gitmo%2FMoose.git handle this in package::stash --- diff --git a/dist.ini b/dist.ini index 053e0d8..81d43e8 100644 --- a/dist.ini +++ b/dist.ini @@ -82,8 +82,8 @@ Eval::Closure = 0.04 List::MoreUtils = 0.28 MRO::Compat = 0.05 Package::DeprecationManager = 0.11 -Package::Stash = 0.21 -Package::Stash::XS = 0.18 +Package::Stash = 0.32 +Package::Stash::XS = 0.24 Params::Util = 1.00 Scalar::Util = 1.19 Sub::Exporter = 0.980 diff --git a/lib/Class/MOP/Module.pm b/lib/Class/MOP/Module.pm index 5cc151a..c1a813c 100644 --- a/lib/Class/MOP/Module.pm +++ b/lib/Class/MOP/Module.pm @@ -74,9 +74,6 @@ sub _instantiate_module { my($self, $version, $authority) = @_; my $package_name = $self->name; - _is_valid_class_name($package_name) - || confess "creation of $package_name failed: invalid package name"; - $self->add_package_symbol('$VERSION' => $version) if defined $version; $self->add_package_symbol('$AUTHORITY' => $authority) @@ -85,18 +82,6 @@ sub _instantiate_module { return; } -sub _is_valid_class_name { - my $class = shift; - - return 0 if ref($class); - return 0 unless defined($class); - return 0 unless length($class); - - return 1 if $class =~ /^\w+(?:::\w+)*$/; - - return 0; -} - 1; # ABSTRACT: Module Meta Object diff --git a/t/cmop/class_errors_and_edge_cases.t b/t/cmop/class_errors_and_edge_cases.t index 02096b3..51810a3 100644 --- a/t/cmop/class_errors_and_edge_cases.t +++ b/t/cmop/class_errors_and_edge_cases.t @@ -50,8 +50,7 @@ use Class::MOP; isnt( exception { Class::MOP::Class->create('+++'); - }, undef, '... create requires a valid package_name parameter' ); - + }, qr/^\+\+\+ is not a module name/, '... create requires a valid package_name parameter' ); } { diff --git a/t/cmop/self_introspection.t b/t/cmop/self_introspection.t index dd16b19..c735f74 100644 --- a/t/cmop/self_introspection.t +++ b/t/cmop/self_introspection.t @@ -44,8 +44,6 @@ my @class_mop_package_methods = qw( my @class_mop_module_methods = qw( _new - _is_valid_class_name - _instantiate_module version authority identifier create