Skip Menu |

This queue is for tickets about the Perl-Critic-Pulp CPAN distribution.

Report information
The Basics
Id: 118722
Status: resolved
Priority: 0/
Queue: Perl-Critic-Pulp

People
Owner: Nobody in particular
Requestors: PETDANCE [...] cpan.org
Cc:
AdminCc:

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



Subject: RequireFinalCut fires if =cut isn't preceded by a blank line
This code executes correctly: my $x = 199; =pod blah blah =cut print "$x\n"; There should be a blank line before the =cut, and pod2text complains properly: $ pod2text pod.pl pod.pl around line 2: =pod directives shouldn't be over one line long! Ignoring all 2 lines of content However, RequireFinalCut complains that there isn't a final =cut. I understand that there should be a blank line before the =cut, but the message should say that instead of saying that there isn't a =cut.
Subject: Re: [rt.cpan.org #118722] RequireFinalCut fires if =cut isn't preceded by a blank line
Date: Sat, 12 Nov 2016 18:45:59 +1100
To: "Andy Lester via RT" <bug-Perl-Critic-Pulp [...] rt.cpan.org>
From: Kevin Ryde <user42_kevin [...] yahoo.com.au>
"Andy Lester via RT" <bug-Perl-Critic-Pulp@rt.cpan.org> writes: Show quoted text
> > I understand that there should be a blank line before the =cut,
Yes. Show quoted text
> but the message should say that instead of saying that there > isn't a =cut.
Hmm. I use Pod::Parser and it doesn't present such a =cut as a "cut without blank", rather gives text "blah blah =cut" arguments to the =pod command (which doesn't take arguments, per the warning message you saw). I'm not sure if it's a good idea for me to try to notice a cut which has not parsed. What do you think? I had intended letting podchecker cover parse problems (even possibly in a perlcritic policy if wanted within that framework). But maybe I should output parse error messages anyway so as not to silently let badness go by, even if they might be repeated a few times when successive policies parse. Hmm.
Not sure what to do. Not sure it's worth putting out two different error messages. Maybe modify the existing one to cover the cause of "=cut without a preceding newline"? All I know is that when I first got the error I was a little confused because clearly there's that =cut and so what's it complaining about?
Subject: Re: [rt.cpan.org #118722] RequireFinalCut fires if =cut isn't preceded by a blank line
Date: Thu, 24 Nov 2016 21:58:08 +1100
To: "Andy Lester via RT" <bug-Perl-Critic-Pulp [...] rt.cpan.org>
From: Kevin Ryde <user42_kevin [...] yahoo.com.au>
"Andy Lester via RT" <bug-Perl-Critic-Pulp@rt.cpan.org> writes: Show quoted text
> > All I know is that when I first got the error I was a little confused > because clearly there's that =cut and so what's it complaining about?
On balance, yep. I uploaded a version 91 allowing for no blank line. As you say, that's how it looks, and how perl executes. podchecker or another policy can report whether pod without blanks is in fact a good idea. -- I played a country and western song backwards to listen for evil messages. It sounded just the same except it was about a fella whose wife stood by him while he brought in a successful harvest and his dog recovered from a long illness.