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
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)
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
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' );
}
{