Dist::Zilla Consumes Even More

Back to do some more Sections here in the Dist-pen today.

Today I am going to look at three plug-ins the very simple [Extends] the equally simple [MooseExtends] the little different [MooseConsumes]

The first two do what you would expect. Create an 'EXTENDS' section in your POD that lists all the modules that your '.pm' file is based on.

The first one [Extends] loops though the '@isa' and plucks the information from there. Now for kicks I installed this one and added it to my 'weaver.ini' and I got


=head1 EXTENDS
=over 4
=item * L<Moose::Meta::Class::__ANON__::SERIAL::37>
=back
after a clean an build, So this is not a plug-in that I would use with a Moose class.

Next I gave [MooseExtends] a go and for some reason I get


=head1 EXTENDS
=over 4
=item * L<Moose::Meta::Class::__ANON__::SERIAL::37>
=back
yet again. Now the problem here is I do not extend my 'Database::Accessor' class in any way. Now I did play about for a few mins and took one of the embedded classes 'Database::Accessor::View' into its own file and after a little playing about with 'use lib' I got this;

=head1 EXTENDS
=over 4
=item * L<Database::Accessor::Base>
=back
which is what one would expect as I have this

package Database::Accessor::View;
        use Moose;
        extends 'Database::Accessor::Base'
in the source ',pm' file. The only worrying bit is I still get that 'ANON' bit in the 'Accessor.pm' POD so not really useful to me and from what I see there is no easy way to suppress the 'ANON' so not much use to you unless all your Moose classes extend in some way.

The final on for today [MooseConsumes] is really just the same as the [Consumes] plug-in we saw in my last post as once I swapped it out for it in my 'weaver.ini' file like this


--[Consumes]
++[MooseConsumes]
[MooseExtends]
I got the same results as yesterday;

=head1 CONSUMES
=over 4
=item * L<Database::Accessor::Types>
=back
after a clean and build with dzil.

So not much to these, as none of them have any attributes and I guess the only small bonus is when you install either [MooseExtends] or [MooseConsumes] you get both so you save one CPAN command.

I guess people like re-inventing things or maybe things are sometimes hard to find on CPAN?

dc468273183bb6c54040d540a1c8464a.jpg

Leave a comment

About byterock

user-pic Long time Perl guy, a few CPAN mods allot of work on DBD::Oracle and a few YAPC presentations