summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-07-28 10:03:31 -0600
committerKarl Williamson <public@khwilliamson.com>2011-07-28 19:25:40 -0600
commit46b134f400b2fdd29192490603f71e1614da4576 (patch)
tree5e9b94a5411ee8171f348968f91e8023ebf3b708 /t
parentdf0e39735c221e0c561664e95a4b47b924ac9397 (diff)
downloadperl-46b134f400b2fdd29192490603f71e1614da4576.tar.gz
podcheck.t: Fix confusion between "indent", "tab stop"
podcheck.t has a variable named $INDENT which really meant the first tab stop column. This patch changes the value to the meaning of "indent".
Diffstat (limited to 't')
-rw-r--r--t/porting/podcheck.t9
1 files changed, 7 insertions, 2 deletions
diff --git a/t/porting/podcheck.t b/t/porting/podcheck.t
index f0a406943b..1830410553 100644
--- a/t/porting/podcheck.t
+++ b/t/porting/podcheck.t
@@ -280,7 +280,7 @@ my $known_issues = File::Spec->catfile($data_dir, 'known_pod_issues.dat');
my $copy_fh;
my $MAX_LINE_LENGTH = 80; # 80 columns
-my $INDENT = 8; # default nroff indent
+my $INDENT = 7; # default nroff indent
# Our warning messages. Better not have [('"] in them, as those are used as
# delimiters for variable parts of the messages by poderror.
@@ -672,7 +672,12 @@ package My::Pod::Checker { # Extend Pod::Checker
$lines[$i] =~ s/\s+$//;
my $indent = $self->get_current_indent;
my $exceeds = length(Text::Tabs::expand($lines[$i]))
- + $indent - $MAX_LINE_LENGTH;
+
+ # To see why the +1 is needed, consider
+ # $MAX_LINE_LENGTH == 80, with an $indent also of
+ # 80. Then, any text starts in column 81, and so
+ # a line with length 1 exceeds 80 by 1.
+ + $indent - $MAX_LINE_LENGTH + 1;
next unless $exceeds > 0;
my ($file, $line) = $pod_para->file_line;
$self->poderror({ -line => $line + $i, -file => $file,