Dist::Zilla Get More Friends

Plug-in test day yet again here in the Dist-Pen.

After getting my Legal test to work in yesterday's post, funny thin is metacpan still show ver 0.02 as the latest not 0.03 for some reason, I am going to plink away at seven more sisters today;


This one is a 'Release' test case for those out there that will do not automatically increment their version in some way. At this point I want to try, once I get all my testing in order, to use the Dist::Zilla::plug-in::Git::NextVersion plug-in so I will leave this one out for now, but will keep is in the tool bin just in case I can't play nice with my GitHub account.


An 'Author' test case that provides 'Test::NoBreakpoints'. Well this is one for the real Poindexters out there as it looks for breakpoints in you perl code, to be specificity '$DB::single' not something I have ever used. It is a good example of danger found with name-space pollution, In this case the DB is for DeBug while 86.43% of the rest of the world would see this is DataBase.


This 'Author' test provides the 'Test::NoTabs' case which I actually can use so I am going to add it in, after I check the CPANTS and see a nice sea of green, I spent a little time installing with CPAN and then added this


to my '.ini' file and ran my test case like this dzil xtest author/no and got

Building Database-Accessor
xt/author/no-tabs.t .. ok
All tests successful.
Files=1, Tests=32, 0 wallclock secs ( 0.07 usr 0.01 sys + 0.11 cusr 0.03 csys = 0.22 CPU)
Result: PASS

So I guess all that time running my code though Perl::Tidy payed off.


A 'Release' test that provides the Test::PAUSE::Permissions test case. A real neat one for me as I flip between development platforms and the odd time Window permission can cause you problems. So after a little while I got every thing installed I added;


and then gave dzil xtest release/p a go with this result;

Building Database-Accessor
xt/release/pause-permissions.t .. skipped: Can't determine who is going to release.
Files=1, Tests=0, 1 wallclock secs ( 0.05 usr 0.01 sys + 0.33 cusr 0.06 csys = 0.45 CPU)

Ok I will keep this one for now and delay the set up till when I am ready to try a release.


An 'Author' level test case that applies the coding style from the Perl Beginners' Site well not something I am in need of so this one is not going in.


Another keeper here this 'Author' level test that give me highly configurable POD testing so after a little while installing everything I added

class = Pod::Coverage::Moose
also_private = BUILDARGS
also_private = qr/_^/

into my '.ini' file as I want to try a few things my 'BUILDARGS' sub and anything starting with a '_' will be skipped and I am using the 'Pod::Coverage::Moose' rather than the default 'Pod::Coverage'. So with a quick 'dzil xtest author/po' I get

# Failed test 'pod coverage for Database::Accessor'
# at xt/author/pod-coverage.t line 43.
# Coverage for Database::Accessor is 0.0%, with 5 naked subroutines:
# create
# delete
# retrieve
# update

# Failed test 'pod coverage for Database::Accessor::Constants'
# at xt/author/pod-coverage.t line 43.

Which I expected as I haven't written much POD yet. Things did work for me as the 'sub _loadDADClassesFromDir ' from Database::Accessor is skipped so a great tool for me.


Another 'Author' level test that I am going to add in. This one provides a test case that will look at your pod to make sure you have no bad links in your POD. I did add it in;

also_private = qr/_^/

and after some installs I gave ' dzil xtest author/pod-l' a go and got;

xt/author/pod-linkcheck.t .. ok
All tests successful.
Files=1, Tests=4, 1 wallclock secs ( 0.03 usr 0.01 sys + 0.55 cusr 0.08 csys = 0.67 CPU)
Result: PASS

which is hardly surprising as I have very little POD so far.

All in all not a bad day three new test buddies for my Dist::Zilla and one for later.


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