From: Shawn M Moore Date: Sun, 13 Jan 2008 03:01:46 +0000 (+0000) Subject: A bit of doc for rebless_instance X-Git-Tag: 0_51~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=69663c575746a310f020efcb3a6981dcdd856f76;p=gitmo%2FClass-MOP.git A bit of doc for rebless_instance --- diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index f0851a5..7ac3f06 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -1106,6 +1106,15 @@ shallow cloning is outside the scope of the meta-object protocol. I think Yuval "nothingmuch" Kogman put it best when he said that cloning is too I to be part of the MOP. +=item B + +This will change the class of C<$instance> to the class of the invoking +C. You may only rebless the instance to a subclass of +itself. This limitation may be relaxed in the future. + +This can be useful in a number of situations, such as when you are writing +a program that doesn't know everything at object construction time. + =back =head2 Informational