Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Pod::Coverage tests failing for documented module. Why?

by hesco (Deacon)
on Jan 19, 2007 at 19:37 UTC ( [id://595548]=perlquestion: print w/replies, xml ) Need Help??

hesco has asked for the wisdom of the Perl Monks concerning the following question:

I have diligently documented every public method and prefixed every private method with an underbar.

I'd hate to post this to CPAN with a broken test like this, since it would possibly fail to install for others. Short of marking this test as TODO: or SKIP:, does anyone have any ideas how to proceed to figure out what is required to make this test happy?

Any and all ideas are appreciated.

-- Hugh

t/pod-coverage.t 1..1 not ok 1 - Pod coverage on Politics::US::VA::SBEWebServices # Failed test 'Pod coverage on Politics::US::VA::SBEWebServices' # at /usr/local/share/perl/5.8.4/Test/Pod/Coverage.pm line 126. # Politics::US::VA::SBEWebServices: couldn't find pod # Looks like you failed 1 test of 1.
if( $lal && $lol ) { $life++; }

Replies are listed 'Best First'.
Re: Pod::Coverage tests failing for documented module. Why?
by philcrow (Priest) on Jan 19, 2007 at 19:44 UTC
    You'd have to show us some of the code for us to comment on how the coverage test failed to find the pod.

    The only time I get that message is when the file in the message has no pod, but sometimes I have to read the path twice to realize which file is offending.

    Phil

      I guess what I ought to do then, is go ahead and post this to CPAN, so others can take a look. It seems crazy to post a 400 line module to a web form. I'm afraid my test data is still proprietary data from the group which asked me to write this. Before this gets published for real, I was going to scramble that data for the public. But as this module is designed to interact with web services hosted elsewhere, it takes over 15 minutes to run a test suite with fewer than 60 test cases. Its the data they wanted to see work, but CPAN probbaly deserves a more thoughtful test suite and set of test cases.

      -- Hugh

      if( $lal && $lol ) { $life++; }
        It seems crazy to post a 400 line module to a web form
        nothing wrong with that -- you'll find longer around here .. you can edit your OP -- just be sure use <readmore><code> ... </code></readmore> tags

        you might even get some code review comments in the process ;)
Re: Pod::Coverage tests failing for documented module. Why?
by chargrill (Parson) on Jan 20, 2007 at 05:21 UTC

    First, you should skip everything in pod-coverage.t if the user doesn't have Test::Pod::Coverage. Plain and simple, that's primarily for you - no one other than CPAN module contributors is likely to have Test::Pod::Coverage, which of CPAN consumers, is a small percentage. i.e.

    use strict; use warnings; use Test::More; eval { use Test::Pod::Coverage qw( no_plan ); }; if( @$ ){ plan skip_all => 'Test::Pod::Coverage required for testing POD coverage'; } # ...

    Second, everything needs to be documented when testing pod coverage. I forget the details, but I think 95% pod coverage (all public methods, but no private methods) still resulted in a failure last time I ran a pod-coverage.t file on a suite of my recent modules. (And I just checked the docs, no mention of honoring prefixing private methods with underbars.) So I POD'd everything (even though I skip_all'd in my .t file). Every module had everything documented:

    =head1 NAME =head1 SYNOPSIS =head1 DESCRIPTION =head2 Methods =over20 =item new() =item isValid() =item getFoo() =item setFoo() =item getBar() =item setBar() =item _validateBaz =item _validateFred =back =head1 AUTHOR =head1 BUGS =head1 ACKNOWLEDGEMENTS =head1 SEE ALSO =cut


    --chargrill
    s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)
Re: Pod::Coverage tests failing for documented module. Why?
by Herkum (Parson) on Jan 19, 2007 at 20:37 UTC

    More than likely your actual pod is invalid. Is your Pod seperate from your code? If not it will be hard to debug, better to put all your Pod at end the of the file. It will be easier to maintain that way.

Re: Pod::Coverage tests failing for documented module. Why?
by Anonymous Monk on Jan 20, 2007 at 00:39 UTC
    I have diligently documented every public method and prefixed every private method with an underbar.
    But did you use pod?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://595548]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-24 03:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found