In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/a733b0cccc9700063dc0098097b23be2dcbf339d?hp=d399cf59bde32e412ae99791ae46a871c7337b42>
- Log ----------------------------------------------------------------- commit a733b0cccc9700063dc0098097b23be2dcbf339d Author: Dave Rolsky <[email protected]> Date: Tue Feb 19 14:56:35 2013 -0600 Add some text on the interoperability of Moose & Moo to perlootut M pod/perlootut.pod commit 134d6544c339d9109c2d512ae6c3e0fefce01e99 Author: Dave Rolsky <[email protected]> Date: Tue Feb 19 14:51:08 2013 -0600 Add a note to the future that they should read the latest perlootut M pod/perlootut.pod commit 27ffaccdf2f8d846dba804763ecfb44c2ae3791f Author: Dave Rolsky <[email protected]> Date: Tue Feb 19 14:50:30 2013 -0600 Run podtidy on perlootut M pod/perlootut.pod ----------------------------------------------------------------------- Summary of changes: pod/perlootut.pod | 34 +++++++++++++++++++++++++--------- 1 files changed, 25 insertions(+), 9 deletions(-) diff --git a/pod/perlootut.pod b/pod/perlootut.pod index 6f373a2..e494f23 100644 --- a/pod/perlootut.pod +++ b/pod/perlootut.pod @@ -10,7 +10,13 @@ perlootut - Object-Oriented Programming in Perl Tutorial =head1 DATE -This document was created in February, 2011. +This document was created in February, 2011, and the last major +revision was in February, 2013. + +If you are reading this in the future then it's possible that the state +of the art has changed. We recommend you start by reading the perlootut +document in the latest stable release of Perl, rather than this +version. =head1 DESCRIPTION @@ -218,8 +224,8 @@ Polymorphism is one of the key concepts of object-oriented design. =head2 Inheritance B<Inheritance> lets you create a specialized version of an existing -class. Inheritance lets the new class reuse the methods and attributes of -another class. +class. Inheritance lets the new class reuse the methods and attributes +of another class. For example, we could create an C<File::MP3> class which B<inherits> from C<File>. An C<File::MP3> B<is-a> I<more specific> type of C<File>. @@ -579,15 +585,25 @@ may not be right for you. =head3 Moo If you try C<Moose> and find that one of these issues is preventing you -from using C<Moose>, we encourage you to consider L<Moo> next. -C<Moo> implements a subset of C<Moose>'s functionality in a simpler -package. For most features that it does implement, the end-user API is +from using C<Moose>, we encourage you to consider L<Moo> next. C<Moo> +implements a subset of C<Moose>'s functionality in a simpler package. +For most features that it does implement, the end-user API is I<identical> to C<Moose>, meaning you can switch from C<Moo> to C<Moose> quite easily. -C<Moo> does not implement most of C<Moose>'s introspection API, so it's often -faster when loading your modules. Additionally, none of its dependencies -require XS, so it can be installed on machines without a compiler. +C<Moo> does not implement most of C<Moose>'s introspection API, so it's +often faster when loading your modules. Additionally, none of its +dependencies require XS, so it can be installed on machines without a +compiler. + +One of C<Moo>'s most compelling features is its interoperability with +C<Moose>. When someone tries to use C<Moose>'s introspection API on a +C<Moo> class or role, it is transparently inflated into a C<Moose> +class or role. This makes it easier to incorporate C<Moo>-using code +into a C<Moose> code base and vice versa. + +For example, a C<Moose> class can subclass a C<Moo> class using +C<extends> or consume a C<Moo> role using C<with>. The C<Moose> authors hope that one day C<Moo> can be made obsolete by improving C<Moose> enough, but for now it provides a worthwhile -- Perl5 Master Repository
