to fork all of CPAN. (perigrin)
- add tests and documentation (perigrin)
+ * Moose
+ - Document the fact that init_meta() returns the target class' metaclass
+ object. (Dieter Pearcey)
+
+ * Moose::Cookbook::Extending::Recipe1
+ * Moose::Cookbook::Extending::Recipe2
+ * Moose::Cookbook::Extending::Recipe3
+ * Moose::Cookbook::Extending::Recipe4
+ - Make init_meta() examples explicitly return the metaclass and point out
+ this fact. (Dieter Pearcey)
+
+
0.73 Fri, March 29, 2009
* No changes from 0.72_01.
into the class so you can get at this object. It also sets the class's
superclass to C<base_class>, with L<Moose::Object> as the default.
+C<init_meta> returns the metaclass object for C<$class>.
+
You can specify an alternate metaclass with the C<metaclass> option.
For more detail on this topic, see L<Moose::Cookbook::Extending::Recipe2>.
);
}
+NOTE: Make sure that your C<init_meta> returns the metaclass object, just as
+C<< Moose->init_meta >> does.
+
=head2 Extensions as Metaclass (and Base Object) Roles
Implementing your extensions as metaclass roles makes your extensions
shift;
my %options = @_;
- Moose->init_meta(%options);
+ my $meta = Moose->init_meta(%options);
Moose::Util::MetaRole::apply_base_class_roles(
for_class => $options{for_class},
roles => ['MooseX::Debugging::Role::Object'],
);
+
+ return $meta;
}
package MooseX::Debugging::Role::Object;
sub init_meta {
shift;
- Moose->init_meta( @_, base_class => 'MyApp::Base' );
+ return Moose->init_meta( @_, base_class => 'MyApp::Base' );
}
=head1 DESCRIPTION
sub init_meta {
shift;
- Moose->init_meta( @_, metaclass => 'MyApp::Meta::Class' );
+ return Moose->init_meta( @_, metaclass => 'MyApp::Meta::Class' );
}
sub has_table {