This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make t/podcheck.t less sensitive
authorDavid Golden <dagolden@cpan.org>
Thu, 23 May 2013 20:33:09 +0000 (16:33 -0400)
committerDavid Golden <dagolden@cpan.org>
Fri, 24 May 2013 00:11:24 +0000 (20:11 -0400)
The max line length is increased to 100.  This eliminates dozens of
known issues.

The warnings about using F<> and L<> instead of C<> have been removed
on the rationale that they are too opinionated.  They flag stylistic
issues rather than syntactic or structural issues and have minimal
impact on the effectiveness of the resulting documentation.

t/porting/known_pod_issues.dat
t/porting/podcheck.t

index b175a81..ffdb477 100644 (file)
@@ -186,159 +186,40 @@ Win32::Locale
 YAML
 YAML::Syck
 YAML::Tiny
-dist/cwd/lib/file/spec/vms.pm  Verbatim line length including indents exceeds 79 by    1
-dist/cwd/lib/file/spec/win32.pm        Verbatim line length including indents exceeds 79 by    1
-dist/data-dumper/dumper.pm     ? Should you be using L<...> instead of 1
-dist/extutils-parsexs/lib/perlxs.pod   Verbatim line length including indents exceeds 79 by    1
-dist/extutils-parsexs/lib/perlxstut.pod        Verbatim line length including indents exceeds 79 by    10
+dist/extutils-parsexs/lib/perlxstut.pod        Verbatim line length including indents exceeds 100 by   1
 dist/filter-simple/lib/filter/simple.pm        Verbatim paragraph in NAME section      1
 dist/locale-maketext/lib/locale/maketext/tpj13.pod     No items in =over / =back list  3
-dist/math-bigint/lib/math/bigint.pm    Verbatim line length including indents exceeds 79 by    77
 dist/math-bigint/lib/math/bigint/calcemu.pm    empty section in previous paragraph     3
-dist/math-bigrat/lib/math/bigrat.pm    Verbatim line length including indents exceeds 79 by    7
 dist/math-bigrat/lib/math/bigrat.pm    unresolved internal link        1
-dist/module-corelist/blib/script/corelist      Verbatim line length including indents exceeds 79 by    1
-dist/module-corelist/lib/module/corelist.pod   Verbatim line length including indents exceeds 79 by    4
-dist/net-ping/lib/net/ping.pm  Verbatim line length including indents exceeds 79 by    2
-dist/safe/safe.pm      Verbatim line length including indents exceeds 79 by    1
+dist/net-ping/lib/net/ping.pm  Verbatim line length including indents exceeds 100 by   1
 dist/safe/safe.pm      empty section in previous paragraph     1
-dist/selfloader/lib/selfloader.pm      Verbatim line length including indents exceeds 79 by    13
-dist/storable/storable.pm      Verbatim line length including indents exceeds 79 by    4
-dist/thread-queue/lib/thread/queue.pm  Verbatim line length including indents exceeds 79 by    4
-dist/threads/lib/threads.pm    Verbatim line length including indents exceeds 79 by    3
-dist/tie-file/lib/tie/file.pm  Verbatim line length including indents exceeds 79 by    3
-ext/b/b/concise.pm     Verbatim line length including indents exceeds 79 by    1
-ext/devel-peek/peek.pm ? Should you be using L<...> instead of 2
-ext/devel-peek/peek.pm Verbatim line length including indents exceeds 79 by    2
-ext/dynaloader/dynaloader.pm   Verbatim line length including indents exceeds 79 by    1
-ext/file-glob/glob.pm  Verbatim line length including indents exceeds 79 by    15
-ext/hash-util-fieldhash/lib/hash/util/fieldhash.pm     Verbatim line length including indents exceeds 79 by    2
-ext/i18n-langinfo/langinfo.pm  Verbatim line length including indents exceeds 79 by    1
 ext/pod-html/bin/pod2html      Pod NAME already used   1
-ext/pod-html/testdir/perlpodspec-copy.pod      Verbatim line length including indents exceeds 79 by    8
-ext/pod-html/testdir/perlvar-copy.pod  ? Should you be using L<...> instead of 3
-ext/pod-html/testdir/perlvar-copy.pod  Verbatim line length including indents exceeds 79 by    6
-ext/posix/lib/posix.pod        Verbatim line length including indents exceeds 79 by    13
-ext/vms-dclsym/dclsym.pm       ? Should you be using L<...> instead of 1
-ext/vms-dclsym/dclsym.pm       Verbatim line length including indents exceeds 79 by    1
-ext/vms-stdio/stdio.pm Verbatim line length including indents exceeds 79 by    1
-ext/xs-apitest/apitest.pm      Verbatim line length including indents exceeds 79 by    1
-install        ? Should you be using F<...> or maybe L<...> instead of 1
-installhtml    Verbatim line length including indents exceeds 79 by    3
-os2/os2/os2-extattr/extattr.pm ? Should you be using F<...> or maybe L<...> instead of 1
-os2/os2/os2-process/process.pm Verbatim line length including indents exceeds 79 by    27
-os2/os2/os2-rexx/dll/dll.pm    Verbatim line length including indents exceeds 79 by    2
-os2/os2/os2-rexx/rexx.pm       Verbatim line length including indents exceeds 79 by    1
-pod/perl.pod   Verbatim line length including indents exceeds 79 by    8
-pod/perlaix.pod        Verbatim line length including indents exceeds 79 by    11
-pod/perlapi.pod        ? Should you be using L<...> instead of 76
-pod/perlapi.pod        Verbatim line length including indents exceeds 79 by    6
+ext/posix/lib/posix.pod        Verbatim line length including indents exceeds 100 by   2
 pod/perlapi.pod        unresolved internal link        3
-pod/perlapio.pod       Verbatim line length including indents exceeds 79 by    5
-pod/perlbook.pod       Verbatim line length including indents exceeds 79 by    1
-pod/perlcall.pod       Verbatim line length including indents exceeds 79 by    2
-pod/perlce.pod Verbatim line length including indents exceeds 79 by    2
-pod/perlcygwin.pod     Verbatim line length including indents exceeds 79 by    24
-pod/perldbmfilter.pod  Verbatim line length including indents exceeds 79 by    1
-pod/perldebguts.pod    Verbatim line length including indents exceeds 79 by    34
-pod/perldebtut.pod     Verbatim line length including indents exceeds 79 by    22
-pod/perldebug.pod      Verbatim line length including indents exceeds 79 by    3
+pod/perlbook.pod       Verbatim line length including indents exceeds 100 by   1
+pod/perlce.pod Verbatim line length including indents exceeds 100 by   2
+pod/perlcygwin.pod     Verbatim line length including indents exceeds 100 by   1
+pod/perldebguts.pod    Verbatim line length including indents exceeds 100 by   2
 pod/perldiag.pod       =item type mismatch     1
-pod/perldiag.pod       Verbatim line length including indents exceeds 79 by    1
-pod/perldsc.pod        Verbatim line length including indents exceeds 79 by    4
-pod/perldtrace.pod     Verbatim line length including indents exceeds 79 by    26
-pod/perlebcdic.pod     Verbatim line length including indents exceeds 79 by    13
-pod/perlembed.pod      Verbatim line length including indents exceeds 79 by    27
+pod/perldtrace.pod     Verbatim line length including indents exceeds 100 by   4
+pod/perlebcdic.pod     Verbatim line length including indents exceeds 100 by   10
 pod/perlfunc.pod       There is more than one target   1
-pod/perlgit.pod        Verbatim line length including indents exceeds 79 by    12
-pod/perlgpl.pod        Verbatim line length including indents exceeds 79 by    50
-pod/perlguts.pod       ? Should you be using F<...> or maybe L<...> instead of 2
-pod/perlguts.pod       ? Should you be using L<...> instead of 1
-pod/perlhack.pod       ? Should you be using L<...> instead of 1
-pod/perlhack.pod       Verbatim line length including indents exceeds 79 by    1
-pod/perlhist.pod       Verbatim line length including indents exceeds 79 by    2
-pod/perlhpux.pod       Verbatim line length including indents exceeds 79 by    5
-pod/perlhurd.pod       Verbatim line length including indents exceeds 79 by    2
-pod/perlintern.pod     ? Should you be using L<...> instead of 5
-pod/perlinterp.pod     ? Should you be using L<...> instead of 1
-pod/perliol.pod        Verbatim line length including indents exceeds 79 by    8
-pod/perlipc.pod        Verbatim line length including indents exceeds 79 by    19
-pod/perlirix.pod       Verbatim line length including indents exceeds 79 by    4
-pod/perllol.pod        Verbatim line length including indents exceeds 79 by    4
-pod/perlmacosx.pod     Verbatim line length including indents exceeds 79 by    4
-pod/perlmod.pod        Verbatim line length including indents exceeds 79 by    2
-pod/perlmodlib.pod     Verbatim line length including indents exceeds 79 by    3
-pod/perlmodstyle.pod   Verbatim line length including indents exceeds 79 by    2
-pod/perlmroapi.pod     ? Should you be using L<...> instead of 1
-pod/perlnetware.pod    Verbatim line length including indents exceeds 79 by    4
-pod/perlnewmod.pod     Verbatim line length including indents exceeds 79 by    1
-pod/perlootut.pod      ? Should you be using F<...> or maybe L<...> instead of 1
-pod/perlos2.pod        ? Should you be using L<...> instead of 2
-pod/perlos2.pod        Verbatim line length including indents exceeds 79 by    22
-pod/perlos390.pod      Verbatim line length including indents exceeds 79 by    11
-pod/perlpacktut.pod    Verbatim line length including indents exceeds 79 by    6
-pod/perlperf.pod       Verbatim line length including indents exceeds 79 by    154
-pod/perlpodspec.pod    Verbatim line length including indents exceeds 79 by    9
-pod/perlpodstyle.pod   Verbatim line length including indents exceeds 79 by    1
-pod/perlref.pod        Verbatim line length including indents exceeds 79 by    1
-pod/perlrequick.pod    Verbatim line length including indents exceeds 79 by    3
-pod/perlretut.pod      Verbatim line length including indents exceeds 79 by    13
-pod/perlrun.pod        Verbatim line length including indents exceeds 79 by    3
-pod/perlsolaris.pod    Verbatim line length including indents exceeds 79 by    14
-pod/perlsource.pod     ? Should you be using F<...> or maybe L<...> instead of 1
-pod/perlsub.pod        ? Should you be using F<...> or maybe L<...> instead of 3
-pod/perlsub.pod        Verbatim line length including indents exceeds 79 by    4
-pod/perlsymbian.pod    Verbatim line length including indents exceeds 79 by    20
-pod/perlthrtut.pod     Verbatim line length including indents exceeds 79 by    5
-pod/perltie.pod        Verbatim line length including indents exceeds 79 by    13
-pod/perltrap.pod       ? Should you be using F<...> or maybe L<...> instead of 1
-pod/perltru64.pod      ? Should you be using F<...> or maybe L<...> instead of 1
-pod/perltru64.pod      Verbatim line length including indents exceeds 79 by    4
+pod/perlgit.pod        Verbatim line length including indents exceeds 100 by   1
+pod/perlmacosx.pod     Verbatim line length including indents exceeds 100 by   3
+pod/perlnetware.pod    Verbatim line length including indents exceeds 100 by   2
+pod/perlos2.pod        Verbatim line length including indents exceeds 100 by   5
+pod/perlperf.pod       Verbatim line length including indents exceeds 100 by   32
+pod/perlrun.pod        Verbatim line length including indents exceeds 100 by   1
+pod/perlthrtut.pod     Verbatim line length including indents exceeds 100 by   1
+pod/perltru64.pod      Verbatim line length including indents exceeds 100 by   3
 pod/perlunifaq.pod     empty section in previous paragraph     1
 pod/perluniprops.pod   =item type mismatch     6
-pod/perlvms.pod        ? Should you be using F<...> or maybe L<...> instead of 1
-pod/perlvms.pod        Verbatim line length including indents exceeds 79 by    2
-pod/perlwin32.pod      Verbatim line length including indents exceeds 79 by    12
-porting/epigraphs.pod  Verbatim line length including indents exceeds 79 by    3
-porting/expand-macro.pl        Verbatim line length including indents exceeds 79 by    2
+pod/perlwin32.pod      Verbatim line length including indents exceeds 100 by   6
 porting/how_to_write_a_perldelta.pod   There is no NAME        1
-porting/how_to_write_a_perldelta.pod   Verbatim line length including indents exceeds 79 by    3
-porting/pumpkin.pod    Verbatim line length including indents exceeds 79 by    9
-porting/release_managers_guide.pod     Verbatim line length including indents exceeds 79 by    7
+porting/release_managers_guide.pod     Verbatim line length including indents exceeds 100 by   1
 porting/release_schedule.pod   There is no NAME        1
-porting/todo.pod       Verbatim line length including indents exceeds 79 by    7
-symbian/perlutil.pod   Verbatim line length including indents exceeds 79 by    4
-utils/c2ph     Verbatim line length including indents exceeds 79 by    44
+porting/todo.pod       Verbatim line length including indents exceeds 100 by   1
 utils/pod2html Pod NAME already used   1
-vms/ext/filespec.pm    Verbatim line length including indents exceeds 79 by    1
 x2p/a2p.pod    empty section in previous paragraph     2
-lib/benchmark.pm       Verbatim line length including indents exceeds 79 by    4
-lib/class/struct.pm    Verbatim line length including indents exceeds 79 by    7
-lib/config.pod ? Should you be using L<...> instead of -1
+lib/benchmark.pm       Verbatim line length including indents exceeds 100 by   2
 lib/config.pod nested commands F<...F<...>...> 3
-lib/db.pm      Verbatim line length including indents exceeds 79 by    2
-lib/dbm_filter.pm      Verbatim line length including indents exceeds 79 by    1
-lib/dbm_filter/compress.pm     Verbatim line length including indents exceeds 79 by    1
-lib/dbm_filter/encode.pm       Verbatim line length including indents exceeds 79 by    1
-lib/dbm_filter/int32.pm        Verbatim line length including indents exceeds 79 by    1
-lib/dbm_filter/null.pm Verbatim line length including indents exceeds 79 by    1
-lib/dbm_filter/utf8.pm Verbatim line length including indents exceeds 79 by    1
-lib/deprecate.pm       Verbatim line length including indents exceeds 79 by    2
-lib/english.pm Verbatim line length including indents exceeds 79 by    1
-lib/extutils/embed.pm  Verbatim line length including indents exceeds 79 by    2
-lib/extutils/xssymset.pm       Verbatim line length including indents exceeds 79 by    1
-lib/file/basename.pm   Verbatim line length including indents exceeds 79 by    2
-lib/file/find.pm       Verbatim line length including indents exceeds 79 by    1
-lib/getopt/std.pm      Verbatim line length including indents exceeds 79 by    1
-lib/integer.pm Verbatim line length including indents exceeds 79 by    1
-lib/perl5db.pl ? Should you be using L<...> instead of 1
-lib/perl5db.pl Verbatim line length including indents exceeds 79 by    1
-lib/perlio.pm  Verbatim line length including indents exceeds 79 by    2
-lib/pod/text/overstrike.pm     Verbatim line length including indents exceeds 79 by    1
-lib/strict.pm  Verbatim line length including indents exceeds 79 by    1
-lib/tie/array.pm       Verbatim line length including indents exceeds 79 by    1
-lib/tie/hash.pm        Verbatim line length including indents exceeds 79 by    3
-lib/tie/scalar.pm      Verbatim line length including indents exceeds 79 by    1
-lib/version.pod        Verbatim line length including indents exceeds 79 by    1
-lib/version/internals.pod      Verbatim line length including indents exceeds 79 by    2
-lib/vmsish.pm  Verbatim line length including indents exceeds 79 by    1
index 1d018f6..8ebe634 100644 (file)
@@ -329,7 +329,7 @@ my $known_issues = File::Spec->catfile($data_dir, 'known_pod_issues.dat');
 my $MANIFEST = File::Spec->catfile(File::Spec->updir($original_dir), 'MANIFEST');
 my $copy_fh;
 
-my $MAX_LINE_LENGTH = 79;   # 79 columns
+my $MAX_LINE_LENGTH = 100;   # 79 columns
 my $INDENT = 7;             # default nroff indent
 
 # Our warning messages.  Better not have [('"] in them, as those are used as
@@ -337,8 +337,6 @@ my $INDENT = 7;             # default nroff indent
 my $line_length = "Verbatim line length including indents exceeds $MAX_LINE_LENGTH by";
 my $broken_link = "Apparent broken link";
 my $broken_internal_link = "Apparent internal link is missing its forward slash";
-my $see_not_linked = "? Should you be using L<...> instead of";
-my $C_with_slash = "? Should you be using F<...> or maybe L<...> instead of";
 my $multiple_targets = "There is more than one target";
 my $duplicate_name = "Pod NAME already used";
 my $need_encoding = "Should have =encoding statement because have non-ASCII";
@@ -811,95 +809,7 @@ package My::Pod::Checker {      # Extend Pod::Checker
                 }
             }
         }
-        $paragraph = join " ", split /^/, $paragraph;
-
-        # Matches something that looks like a file name, but is enclosed in
-        # C<...>
-        my $C_path_re = qr{ \b ( C<
-                                # exclude various things that have slashes
-                                # in them but aren't paths
-                                (?!
-                                    (?: (?: s | qr | m) / ) # regexes
-                                    | \d+/\d+>       # probable fractions
-                                    | OS/2>
-                                    | Perl/Tk>
-                                    | origin/blead>
-                                    | origin/maint
-                                    | -    # File names don't begin with "-"
-                                 )
-                                 [-\w]+ (?: / [-\w]+ )+ (?: \. \w+ )? > )
-                          }x;
-
-        # If looks like a reference to other documentation by containing the
-        # word 'See' and then a likely pod directive, warn.
-        while ($paragraph =~ m{
-                                ( (?: \w+ \s+ )* )  # The phrase before, if any
-                                \b [Ss]ee \s+
-                                ( ( [^L] )
-                                  <
-                                  ( [^<]*? )  # The not < excludes nested C<L<...
-                                  >
-                                )
-                                ( \s+ (?: under | in ) \s+ L< )?
-                            }xg) {
-            my $prefix = $1 // "";
-            my $construct = $2;     # The whole thing, like C<...>
-            my $type = $3;
-            my $interior = $4;
-            my $trailing = $5;      # After the whole thing ending in "L<"
-
-            # If the full phrase is something like, "you might see C<", or
-            # similar, it really isn't a reference to a link.  The ones I saw
-            # all had the word "you" in them; and the "you" wasn't the
-            # beginning of a sentence.
-            if ($prefix !~ / \b you \b /x) {
-
-                # Now, find what the module or man page name within the
-                # construct would be if it actually has L<> syntax.  If it
-                # doesn't have that syntax, will set the module to the entire
-                # interior.
-                $interior =~ m/ ^
-                                (?: [^|]+ \| )? # Optional arbitrary text ending
-                                                # in "|"
-                                ( .+? )         # module, etc. name
-                                (?: \/ .+ )?    # target within module
-                                $
-                            /xs;
-                my $module = $1;
-                if (! defined $trailing # not referring to something in another
-                                        # section
-                    && $interior !~ /$non_pods/
-
-                    # C<> that look like files have their own message below, so
-                    # exclude them
-                    && $construct !~ /$C_path_re/g
-
-                    # There can't be spaces (I think) in module names or man
-                    # pages
-                    && $module !~ / \s /x
-
-                    # F<> that end in eg \.pl are almost certainly ok, as are
-                    # those that look like a path with multiple "/" chars
-                    && ($type ne "F"
-                        || (! -e $interior
-                            && $interior !~ /\.\w+$/
-                            && $interior !~ /\/.+\//)
-                    )
-                ) {
-                    $self->poderror({ -line => $line, -file => $file,
-                        -msg => $see_not_linked,
-                        parameter => $construct
-                    });
-                }
-            }
-        }
-        while ($paragraph =~ m/$C_path_re/g) {
-            my $construct = $1;
-            $self->poderror({ -line => $line, -file => $file,
-                -msg => $C_with_slash,
-                parameter => $construct
-            });
-        }
+
         return;
     }