From: Dave Rolsky Date: Thu, 11 Sep 2008 16:28:39 +0000 (+0000) Subject: Document that passing a method object to add_method may cause it be X-Git-Tag: 0.66~3^2~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fa3fcc9ce7ffad13f55bd868049bf1c4e26749c3;p=gitmo%2FClass-MOP.git Document that passing a method object to add_method may cause it be cloned. --- diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index d76b724..70124b9 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -1457,6 +1457,11 @@ code reference. If you do so, that object gets stored as part of the class's method map, providing more useful information about the method for introspection. +When you provide a method object, this method will clone that object +if the object's package name does not match the class name. This lets +us track the original source of any methods added from other classes +(notably Moose roles). + B: This does absolutely nothing special to C<$method> other than use B to make sure it is tagged with the