From: Yuval Kogman Date: Wed, 13 Aug 2008 21:18:41 +0000 (+0000) Subject: use _new for inline constructors of meta objects X-Git-Tag: 0_64_01~29 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=45582002453c2abd8fb358894933d9094ed2cbe3;p=gitmo%2FClass-MOP.git use _new for inline constructors of meta objects --- diff --git a/lib/Class/MOP.pm b/lib/Class/MOP.pm index c56f63d..20ca98e 100644 --- a/lib/Class/MOP.pm +++ b/lib/Class/MOP.pm @@ -733,8 +733,13 @@ undef Class::MOP::Instance->meta->{_package_cache_flag}; # no actual benefits. $_->meta->make_immutable( - inline_constructor => 0, - inline_accessors => 0, + ( $_->can("_new") ? ( + inline_constructor => 1, + constructor_name => "_new", + ) : ( + inline_constructor => 0, + ) ), + inline_accessors => 0, ) for qw/ Class::MOP::Package Class::MOP::Module