develooper Front page | perl.perl5.porters | Postings from March 2001

morepod

From:
Michael Stevens
Date:
March 4, 2001 06:42
Subject:
morepod
Message ID:
20010304144215.B1928@firedrake.org
--cut--

=over 4

=item green

=item cheese

=item 64-bit cheese

=back

--cut--

If you ask podchecker, you've just mixed numbers and definitions in your
pod, and it is therefore worthy of a warning. I personally would like
to disagree. It doesn't look like a number to me.

I've tried to clean this up a little, but I can't see a way to fix it
cleanly, without disallowing stuff like:

=item 1. First

which the current code seems keen to consider a number.

A BAD and WRONG patch is attached:

--- perl-current.orig/lib/Pod/Checker.pm	Sun Mar  4 12:47:37 2001
+++ perl-current.build/lib/Pod/Checker.pm	Sun Mar  4 14:21:31 2001
@@ -863,7 +863,7 @@
                   $self->{_list_item_contents} = $1 ? 1 : 0;
                   $arg = $1;
                 }
-                elsif($arg =~ /^\d+\.?\s*(\S*)/) {
+                elsif($arg =~ /^\d+\.?\s*(\S*)$/) {
                   $type = 'number';
                   $self->{_list_item_contents} = $1 ? 1 : 0;
                   $arg = $1;

It seems to help a little, IMHO, but still claims things are numbers
when I don't think they should be.

(this came up from noticing several cases in perl-current where podchecker
claims number/definition contradictions where it doesn't look like there
actually is a conflict).

Michael



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About