Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Pod-Simple CPAN distribution.

Report information
The Basics
Id: 79932
Status: rejected
Priority: 0/
Queue: Pod-Simple

People
Owner: Nobody in particular
Requestors: KWittrock [...] web.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Invalid "POD Error" message
Date: Sun, 30 Sep 2012 18:06:26 +0200
To: bug-pod-simple [...] rt.cpan.org
From: "K. Wittrock" <KWittrock [...] web.de>
At the end of the generated HTML file, Pod::Simple::HTML (version 3.23) complains: Hey! The above document had some coding errors, which are explained below: Around line 10: Can't have a 0 in =over 0 In "perldoc POD" I can't find any hint that 0 is an invalid indentation. Also, podchecker doesn't complain. I think that "=item *" doesn't need an indentation in some situations, e. g. in section DEPENDENCIES, where most entries in the list fit in one line. My test program looks like this: --------------------------------------- use strict; use warnings; use Pod::Simple::HTML; my $podfile = './tstover0.pod'; -f $podfile or die "$podfile doesn't exist\n"; my $p = Pod::Simple::HTML->new; $p->output_string(\my $html); $p->parse_file($podfile); open my $out, '>', 'out.html' or die "Cannot open 'out.html': $!\n"; print $out $html; --------------------------------------- And this is my test POD: --------------------------------------- =head1 NAME B<tstover0> =head1 DEPENDENCIES In addition to modules that are distributed with perl, this program needs the following modules (available from CPAN): =over 0 =item * L<PerlE<sol>Tk|Tk> =item * L<List::MoreUtils|List::MoreUtils> =back --------------------------------------- Please remove this error message from Pod::Simple::HTML. Kind regards Klaus Wittrock
Subject: Re: [rt.cpan.org #79932] Invalid "POD Error" message
Date: Tue, 2 Oct 2012 09:01:58 -0700
To: bug-Pod-Simple [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
On Sep 30, 2012, at 9:06 AM, K. Wittrock via RT <bug-Pod-Simple@rt.cpan.org> wrote: Show quoted text
> In addition to modules that are distributed with perl, this program > needs the following modules (available from CPAN): > > =over 0
Just use `=over` instead. Best, David
Subject: Re: [rt.cpan.org #79932] Invalid "POD Error" message
Date: Wed, 10 Oct 2012 15:05:48 +0200
To: bug-Pod-Simple [...] rt.cpan.org
From: "K. Wittrock" <KWittrock [...] web.de>
Am 02.10.2012 18:02, schrieb David Wheeler via RT: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=79932 > > > On Sep 30, 2012, at 9:06 AM, K. Wittrock via RT <bug-Pod-Simple@rt.cpan.org> wrote: >
>> In addition to modules that are distributed with perl, this program >> needs the following modules (available from CPAN): >> >> =over 0
> > Just use `=over` instead.
POD is a widely used tool for writing documentation for Perl modules. So I think that any module that processes Pod should accept _any_ POD text that conforms to the POD syntax as documented in "perldoc POD". In addition, new modules that are subclassed from Pod::Simple::HTML don't like to inherit this misbehavior. But it's really hard to remedy this from the outside. On the other hand, you as the author can easily remove this invalid error message. Simply delete lines 1180 to 1186 of Pod::Simple::BlackBox, which read if($1 == 0) { $self->whine( $para->[1]{'start_line'}, "Can't have a 0 in =over $content" ); $para->[1]{'indent'} = 4; } And then the text of the error message in line 1190 "=over should be: '=over' or '=over positive_number'" might be adapted a bit. I do hope that you may get to like my arguments. A friend of mine wrote to me some additional arguments which I try to translate to English (although I don't know what he is talking about): "It would be sufficient when the parser wouldn't complain about "=over 0" and would set the indentation to 0. When in addition this would be used by the HTML converter for setting a fitting class="OverNumber0" class="OverBullet0" at <ol> and <ul>, then I could format this appropriately with CSS. This can be easily done with sprintf: 'over-number' => '<ol class="OverNumber%d">' -> sprintf($tagmap->{'over-number'},$token->{'indent'}). As far as I can see the expenditure wouldn't be very heigh." Kind regards Klaus
On Tue Oct 02 12:02:17 2012, DWHEELER wrote: Show quoted text
> On Sep 30, 2012, at 9:06 AM, K. Wittrock via RT <bug-Pod- > Simple@rt.cpan.org> wrote: >
> > In addition to modules that are distributed with perl, this program > > needs the following modules (available from CPAN): > > > > =over 0
> > Just use `=over` instead.
=over is equivalent to =over 4. What if you want no indent?
Subject: Re: [rt.cpan.org #79932] Invalid "POD Error" message
Date: Wed, 10 Oct 2012 13:11:22 -0700
To: bug-Pod-Simple [...] rt.cpan.org
From: "David E. Wheeler" <david [...] justatheory.com>
On Oct 10, 2012, at 1:07 PM, "Father Chrysostomos via RT" <bug-Pod-Simple@rt.cpan.org> wrote: Show quoted text
>> >> Just use `=over` instead.
> > =over is equivalent to =over 4. What if you want no indent?
Actually, it's the equivalent of +4 since the previous =over. Indentation, IMO, has no business being offered by Pod. I personally long ceased to provide an integer after my =overs, because it had little to no bearing on how the formatter will actually present the list. Best, David
In addition, the Pod spec, perlpodspec, says: If there is any text following the "=over", it must consist of only a nonzero positive numeral. So this cannot be changed without changing the spec. And I don’t think there is much interest in doing that. So I suggest you just use `=over` and not worry about it. Best, David