develooper Front page | perl.perl5.porters | Postings from September 2013

intermittent failure of cpan/Pod-Simple/t/search50.t

Thread Next
Dave Mitchell
September 19, 2013 12:00
intermittent failure of cpan/Pod-Simple/t/search50.t
Message ID:
The test cpan/Pod-Simple/t/search50.t when run under blead, fails
once in approximately 572 times when run in perl core.

This is due to the fact that the test picks just one pod file at random to
check that its name maps back to its pathname. This fails for one
particular file, lib/Pod/perldoc.pod.

This is demonstrated by the following:

    BEGIN {
        @INC = ('lib');
    use strict;
    use Pod::Simple::Search;

    my $x = Pod::Simple::Search->new or die;
    my($name2where) = $x->survey();
    my $i = 0;
    for (sort keys %$name2where) {
        print "bad: [$_] => [$name2where->{$_}]\n" unless $x->find($_);
    print "got $i entries\n";

which gives:

    bad: [perldoc] => [/home/davem/perl5/git/bleed/lib/Pod/perldoc.pod]
    got 572 entries

Note that the name chosen for lib/Pod/perldoc.pod is 'perldoc' rather
than 'Pod::perldoc'.

I don't really understand whether:

1) search50.t has unreasonable expectations;
2) Pod::Simple::Search::survey() should be returning 'Pod::perldoc' as the
    name rather than 'perldoc';
3) perldoc.pod should be installed as lib/perldoc.pod rather than
4) something in the content of perldoc.pod is wrong, and that is confusing

Independently of that, perhaps that test file should check all pod files
rather than just one at random, to make errors easier to spot?

The Enterprise is captured by a vastly superior alien intelligence which
does not put them on trial.
    -- Things That Never Happen in "Star Trek" #10

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About