From: Jesse Luehrs Date: Mon, 10 May 2010 21:47:16 +0000 (-0500) Subject: move some metaclass compat docs from moose to here X-Git-Tag: 1.02~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3ab5cf4a1b6bc25e748ff14debc7fae766cd1a8c;p=gitmo%2FClass-MOP.git move some metaclass compat docs from moose to here --- diff --git a/lib/Class/MOP.pm b/lib/Class/MOP.pm index 37a6af3..fbadae1 100644 --- a/lib/Class/MOP.pm +++ b/lib/Class/MOP.pm @@ -848,6 +848,18 @@ metaclass compatibility both upwards and downwards. | A |<----| B | +---------+ +---------+ +In actuality, I of a class's metaclasses must be compatible, +not just the class metaclass. That includes the instance, attribute, +and method metaclasses, as well as the constructor and destructor +classes. + +C will attempt to fix some simple types of +incompatibilities. If all the metaclasses for the parent class are +I of the child's metaclasses then we can simply replace +the child's metaclasses with the parent's. In addition, if the child +is missing a metaclass that the parent has, we can also just make the +child use the parent's metaclass. + As I said this is a highly esoteric topic and one you will only run into if you do a lot of subclassing of L. If you are interested in why this is an issue see the paper I