From: Yuval Kogman Date: Sun, 10 Aug 2008 19:41:05 +0000 (+0000) Subject: deprecate bless_instance_structure X-Git-Tag: 0_64_01~47 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=becd03c64eba09e26a8936afd316ed2542c51423;p=gitmo%2FClass-MOP.git deprecate bless_instance_structure --- diff --git a/lib/Class/MOP/Instance.pm b/lib/Class/MOP/Instance.pm index 1875668..46773de 100644 --- a/lib/Class/MOP/Instance.pm +++ b/lib/Class/MOP/Instance.pm @@ -64,9 +64,10 @@ sub associated_metaclass { $_[0]{'associated_metaclass'} } sub create_instance { my $self = shift; - $self->bless_instance_structure({}); + bless {}, $self->_class_name; } +# for compatibility sub bless_instance_structure { my ($self, $instance_structure) = @_; bless $instance_structure, $self->_class_name; @@ -74,7 +75,7 @@ sub bless_instance_structure { sub clone_instance { my ($self, $instance) = @_; - $self->bless_instance_structure({ %$instance }); + bless { %$instance }, $self->_class_name; } # operations on meta instance @@ -250,16 +251,19 @@ Returns the metaclass of L. =item B -This creates the appropriate structure needed for the instance and -then calls C to bless it into the class. +This creates the appropriate structure needed for the instance and blesses it. =item B This does just exactly what it says it does. +This method has been deprecated but remains for compatibility reasons. None of +the subclasses of L ever bothered to actually make use of +it, so it was deemed unnecessary fluff. + =item B -This too does just exactly what it says it does. +Creates a shallow clone of $instance_structure. =back