-=pod
+package Moose::Manual::BestPractices;
+
+# ABSTRACT: Get the most out of Moose
-=head1 NAME
+__END__
-Moose::Manual::BestPractices - Get the most out of Moose
+=pod
=head1 RECOMMENDATIONS
1;
The C<use namespace::autoclean> bit is simply good code hygiene, as it removes
-imported symbols from you class's namespace at the end of your package's
-compile cycle, including Moose keywords. Once the class has been
-built, these keywords are not needed.
+imported symbols from your class's namespace at the end of your package's
+compile cycle, including Moose keywords. Once the class has been built, these
+keywords are not needed. (This is preferred to placing C<no Moose> at the end
+of your package).
The C<make_immutable> call allows Moose to speed up a lot of things, most
notably object construction. The trade-off is that you can no longer change
If you know how to do that, you know when to ignore this best practice
;)
-=head2 Always call the original/parent C<BUILD>
+=head2 Always call the original/parent C<BUILDARGS>
If you C<override> the C<BUILDARGS> method in your class, make sure to play
nice and call C<super()> to handle cases you're not checking for explicitly.
metadata. This sort of thing is particularly problematic for MooseX
extensions which rely on introspection to do the right thing.
-=head1 AUTHOR
-
-Yuval (nothingmuch) Kogman
-
-Dave Rolsky E<lt>autarch@urth.orgE<gt>
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright 2009 by Infinity Interactive, Inc.
-
-L<http://www.iinteractive.com>
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
=cut