From: Dave Rolsky Date: Thu, 7 Aug 2008 20:46:33 +0000 (+0000) Subject: Document also parameter and how init_meta is called. X-Git-Tag: 0_55_01~43^2~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=42ade26968f2f4298bd25f449752ef483f6fb479;p=gitmo%2FMoose.git Document also parameter and how init_meta is called. --- diff --git a/lib/Moose/Exporter.pm b/lib/Moose/Exporter.pm index f6cea34..3b90584 100644 --- a/lib/Moose/Exporter.pm +++ b/lib/Moose/Exporter.pm @@ -320,12 +320,33 @@ as-is. You can identify a subroutine by reference, which is handy to re-export some other module's functions directly by reference (C<\&Some::Package::function>). -=item * init_meta_args +=item * also => $name or \@names -... +This is a list of modules which contain functions that the caller +wants to export. These modules must also use C. The +most common use case will be to export the functions from C. + +C also makes sure all these functions get removed +when C is called. =back +=head1 IMPORTING AND init_meta + +If you want to set an alternative base object class or metaclass +class, simply define an C method in your class. The +C method that C generates for you will call +this method (if it exists). It will always pass the caller to this +method via the C parameter. + +Most of the time, your C method will probably just call C<< +Moose->init_meta >> to do the real work: + + sub init_meta { + shift; # our class name + return Moose->init_meta( @_, metaclass => 'My::Metaclass' ); + } + =head1 AUTHOR Dave Rolsky Eautarch@urth.orgE