package Class::MOP::Package; BEGIN {
$Class::MOP::Package::AUTHORITY = 'cpan:STEVAN'; } {
$Class::MOP::Package::VERSION = '2.0204'; } use strict; use
warnings; use Scalar::Util 'blessed', 'reftype', 'weaken'; use
Carp 'confess'; use Devel::GlobalDestruction
'in_global_destruction'; use Package::Stash; use base
'Class::MOP::Object'; # creation ... sub initialize { my (
$class, @args ) = @_; unshift @args, "package" if @args % 2; my
%options = @args; my $package_name = delete $options{package}; #
we hand-construct the class # until we can bootstrap it if ( my
$meta = Class::MOP::get_metaclass_by_name($package_name) ) {
return $meta; } else { my $meta = ( ref $class || $class
)->_new({ 'package' => $package_name, %options, });
Class::MOP::store_metaclass_by_name($package_name, $meta);
Class::MOP::weaken_metaclass($package_name) if $options{weaken};
return $meta; } } sub reinitialize { my ( $class, @args ) = @_;
unshift @args, "package" if @args % 2; my %options = @args; my
$package_name = delete $options{package