Navigation Menu

Skip to content

Commit

Permalink
bring in Pod::Checker warning about =over without =back
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbs committed Apr 12, 2013
1 parent 462378d commit a8b5d9b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
5 changes: 5 additions & 0 deletions lib/Pod/Simple/BlackBox.pm
Expand Up @@ -1518,6 +1518,11 @@ sub _closers_for_all_curr_open {
if($copy[0] eq '=for') {
$copy[0] = '=end';
} elsif($copy[0] eq '=over') {
$self->whine(
$still_open->[1]{start_line} ,
"=over without closing =back"
);

$copy[0] = '=back';
} else {
die "I don't know how to auto-close an open $copy[0] region";
Expand Down
2 changes: 1 addition & 1 deletion t/html01.t
Expand Up @@ -115,7 +115,7 @@ SUBCLASS: {
ok(
My::Pod::HTML->_out(
sub{ $_[0]->bare_output(1) },
"=pod\n\n=over\n\n=item Foo\n\n",
"=pod\n\n=over\n\n=item Foo\n\n=back\n",
),
"\n<dl>\n<dt><a name=\"howdy\"\n>Foo</a></dt>\n</dl>\n",
);
Expand Down
26 changes: 15 additions & 11 deletions t/items.t
Expand Up @@ -189,18 +189,22 @@ ok( $x->_out( join "\n\n", '', '',
$d = 11;
print "# Now checking that document-end closes things right...\n";

ok( $x->_out( join "\n\n", '', '',
'=over',
'=item *',
'Stuff',
'=cut',
'Stuff',
ok( $x->_out(
# We know there'd be a warning about implicit =back; disable it!
sub { $_[0]->no_whining(1); },
join( "\n\n", '', '',
'=over',
'=item 1.',
'=over 19',
'Gleiven',
'Squim F<.thingrc>!',
'', ''
'=item *',
'Stuff',
'=cut',
'Stuff',
'=over',
'=item 1.',
'=over 19',
'Gleiven',
'Squim F<.thingrc>!',
'', '',
),
), join '',
'<Document>',
'<over-bullet indent="4">',
Expand Down

0 comments on commit a8b5d9b

Please sign in to comment.