I thought when creating a new module intended for publishing on CPAN why not using a best practice boilerplate to get it right.

Some searching in the archives recommended ExtUtils::ModuleMaker and Module::Maker both also available with PerlBestPractices sub-modules.

First of all the created files where not as correct as expected, though I was asked for an "abstract" it wasn't included into the module. Well this could be done manually, I could spend another time searching the problem.

BUT to my huge surprise the first testrun on a virgin module failed

# Failed test "Pod coverage on Macro" # at /usr/local/share/perl/5.10.0/Test/Pod/Coverage.pm line 126. # Macro: couldn't find pod # Looks like you failed 1 test of 1.

Couldn't find POD? This file had no subs but already plenty of POD...

After hours of debugging, playing with the POD and patching Test::Pod::Coverage it turned out that the test wasn't able to find and require my module. (thanks for this brilliant error message, Andy!)

The test looked like this

#!perl -T use Test::More; eval "use Test::Pod::Coverage 1.04"; plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD co +verage" if $@; all_pod_coverage_ok();

and the "-T" taint disabled the inclusion of PERL5LIB into @INC. In other words I couldn't point perl to use modules from my development directory.

ATM I left the "-T" out, but I could also extend the test to push "../lib" to @INC.

questions:

  • whats the recommended approach for testing?

  • should I use another approach than setting PERL5LIB?

  • shouldn't a fracking boilerplate test already cover such a case?

    Cheers Rolf

    ( addicted to the Perl Programming Language)


    In reply to ExtUtils::ModuleMaker::PBP and Test::Pod::Coverage problems by LanX

    Title:
    Use:  <p> text here (a paragraph) </p>
    and:  <code> code here </code>
    to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.