Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Reading some of the comments, it's nice to see more people are realising what a stupid methodology Test::Pod::Coverage has. I tried it once, was curious how it could do what it said without using PPI, looked at how it worked, and ran screaming.

    As for the AUTHOR flag, pending some newly created standard, the one you want to use is probably AUTOMATED_TESTING.

    The tests will fail in CPAN Testers, but pass when a user installs it.

    Here's the current version of 99_author.t from my repository (which is bundled with all of my modules).

    -----------------------------------------------------------

    #!/usr/bin/perl

    use strict;
    BEGIN {
            $| = 1;
            $^W = 1;
    }
    use Test::More;

    # Skip if doing a regular install
    unless ( $ENV{AUTOMATED_TESTING} ) {
            plan( skip_all => "Author tests not required for installation" );
    }

    # Can we run the POD tests?
    eval "use Test::Pod 1.00";
    if ( $@ ) {
            plan( skip_all => "Test::Pod 1.00 required for testing POD" );
    }

    # Test POD
    all_pod_files_ok();
    • No, AUTOMATED_TESTING is checking for the wrong thing. There's a distinction between things that should be run by the developers and things that should be run by the "mere" users.

      Smoke vs interactive is a different distinction. The QA thread that couldn't settle on a name centered around AUTHOR_TESTS, I think. I'm happy considering that variable standard-enough.
    • Reading some of the comments, it's nice to see more people are realising what a stupid methodology Test::Pod::Coverage has.

      I'm starting to think that it's stupid because the Pod::Coverage metric is stupid.

      • Pod coverage is not a bad metric iff you use the right one. P::C is a bit too arbitrary about what symbols need coverage. Requiring the code to execute to check the docs is plenty scary too. And slow.

        I've found that looking for a /=head2 $1\b/ to match every /^sub (\w+)/ actually catches places where I renamed the sub and missed the pod. usefulness++, noise-- and all that. Yeah, there's no PPI involved there. Honestly, does it need to be? Not for *my* coding policy.

        Maybe somebody with a stricter polic