From: Yuval Kogman Date: Wed, 13 Aug 2008 21:20:10 +0000 (+0000) Subject: use _new everywhere X-Git-Tag: 0_64_01~24 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b065385edb16a2066d4d5fa9b672f1213cdb51f6;p=gitmo%2FClass-MOP.git use _new everywhere --- diff --git a/lib/Class/MOP.pm b/lib/Class/MOP.pm index 388faef..48dd0cb 100644 --- a/lib/Class/MOP.pm +++ b/lib/Class/MOP.pm @@ -504,7 +504,7 @@ Class::MOP::Method::Generated->meta->add_method('new' => sub { my ($class, %options) = @_; ($options{package_name} && $options{name}) || confess "You must supply the package_name and name parameters"; - my $self = $class->meta->new_object(%options); + my $self = $class->_new(%options); $self->initialize_body; $self; }); @@ -543,7 +543,7 @@ Class::MOP::Method::Accessor->meta->add_method('new' => sub { || confess "You must supply the package_name and name parameters"; # return the new object - my $self = $class->meta->new_object(%options); + my $self = $class->_new(%options); # we don't want this creating # a cycle in the code, if not @@ -589,7 +589,7 @@ Class::MOP::Method::Constructor->meta->add_method('new' => sub { || confess "You must supply the package_name and name parameters"; # return the new object - my $self = $class->meta->new_object(%options); + my $self = $class->_new(%options); # we don't want this creating # a cycle in the code, if not @@ -650,7 +650,7 @@ Class::MOP::Instance->meta->add_method('new' => sub { my $class = shift; my $options = $class->BUILDARGS(@_); - my $self = $class->meta->new_object(%$options); + my $self = $class->_new(%$options); Scalar::Util::weaken($self->{'associated_metaclass'});