Dist::Zilla Hates PEEPS

It boy scout day here in the Dist-Pen.

In may last post I had final look the various [Bug] section plug-ins so today I am going to look at Merit-badges. I am really talking about that great feeling you had when you earned your first badge in Cubs, Brownies or Young Pioneers. You know the ones I mean the ones for learning to build a fire, sew on a badges, help an old man across the street or showing true will in conforming with the collective.

You can get the same feeling all over again in the programming world as well. All joking aside the [Badge] section plug-in is a quick way to get visual display information to potential users of your software such as this;

perl510.png

So at a glace you know it is passing its testing and you need at least perl 5.10 to use it.

As it just a post-ette day today I am just going to have a brief look [Badges] section plug-in. In its simplest form one just needs to to add this into you 'weaver.ini'


[Name]
header = Name
++[Badges]
++badge = perl
++formats = html, markdown
[Region / manual_header]

which should just give me the Perl version I need and have it come up just under the Name section. Like most plug-ins I have to spend some time installing it and the other required modules, The plug-in will go out to a CPAN module Task::Badge::Depot to get the badge in this case. Have a look at that modules to see all the badges that it contains.

So after a dzil clean and build I get


=begin html

<p>
<img src="https://img.shields.io/badge/perl-unknown-brightgreen.svg" alt="Requires Perl unknown" />

=end html


Now this time I do not get any content in the '.POD' files on my distrabution only in my '.pm' files. So Accessor.pm I got the above while in Manual.POD I did not. Which is nice as it I didn't really want such a thing in my tutorial and manual PODs. You will also notice that this section is in HTML format.

I never did add in 'dist.ini' the min version of Perl so that is way I get the "Requires Perl unknown" in above. Some of the badges are dynamic, CPAN Testers is one that comes to mind. It will change as your code is tested so you many notice a change over a few days from repelase as it is smoke-tested.

So that is the post-ette for today. There is allot more to badges than this simple example and it might be something I come back to in a future post.

1nbjzr.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