From: Shawn M Moore Date: Mon, 22 Aug 2011 20:07:37 +0000 (-0400) Subject: Flesh out meta_lookup doc a little more X-Git-Tag: 2.0300~107 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4f45bde8d150845fff6ad353dcff9f0345f7d037;hp=1365431e33988c9a0fced0bbbd6000071fe0780e;p=gitmo%2FMoose.git Flesh out meta_lookup doc a little more --- diff --git a/lib/Moose/Exporter.pm b/lib/Moose/Exporter.pm index 70bda3a..fad3c25 100644 --- a/lib/Moose/Exporter.pm +++ b/lib/Moose/Exporter.pm @@ -783,11 +783,20 @@ when C is called. =item * meta_lookup => sub { ... } -This is a function which will be called to provide the metaclass to -be operated upon by the exporter. This is an advanced feature +This is a function which will be called to provide the metaclass +to be operated upon by the exporter. This is an advanced feature intended for use by package generator modules in the vein of -L in order to simplify reusing sugar from other -modules that use C. +L in order to simplify reusing sugar +from other modules that use C. This function is +used, for example, to select the metaclass to bind to functions +that are exported using the C option. + +This function will receive one parameter: the class name into which +the sugar is being exported. The default implementation is: + + sub { Class::MOP::class_of(shift) } + +Accordingly, this function is expected to return a metaclass. =back