X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FMOP%2FClass.pm;h=b3b6b97b0bfcf86d2b4d1c2e04d7fbd7dca56c1f;hb=7d1a576bad6260090ba0d40950f861227ead48a8;hp=af9b9fe552eb25f154f0c3268b5406f458e7cff1;hpb=03a3092d71681931085a2307bf7cade0ed79b66d;p=gitmo%2FClass-MOP.git diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index af9b9fe..b3b6b97 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -613,6 +613,13 @@ sub _create_meta_instance { return $instance; } +sub inline_create_instance { + my $self = shift; + my ($class) = @_; + + return $self->get_meta_instance->inline_create_instance($class); +} + sub clone_object { my $class = shift; my $instance = shift; @@ -1517,6 +1524,11 @@ metaclass. Returns an instance of the C to be used in the construction of a new instance of the class. +=item B<< $metaclass->inline_create_instance($class_var) >> + +This method takes a variable name, and uses it create an inline snippet of +code that will create a new instance of the class. + =back =head2 Informational predicates