Class::MOP::_is_valid_class_name($package_name)
|| confess "creation of $package_name failed: invalid package name";
- no strict 'refs';
- scalar %{ $package_name . '::' }; # touch the stash
- ${ $package_name . '::VERSION' } = $version if defined $version;
- ${ $package_name . '::AUTHORITY' } = $authority if defined $authority;
+ $self->add_package_symbol('$VERSION' => $version)
+ if defined $version;
+ $self->add_package_symbol('$AUTHORITY' => $authority)
+ if defined $authority;
return;
}
=over 4
+=item B<< Class::MOP::Module->create($package, %options) >>
+
+Overrides C<create> from L<Class::MOP::Package> to provide these additional
+options:
+
+=over 4
+
+=item C<version>
+
+A version number, to be installed in the C<$VERSION> package global variable.
+
+=item C<authority>
+
+An authority, to be installed in the C<$AUTHORITY> package global variable.
+
+=back
+
=item B<< $metamodule->version >>
This is a read-only attribute which returns the C<$VERSION> of the