From: Vincent Pit Date: Tue, 28 Dec 2010 11:27:29 +0000 (+0100) Subject: Make _sanitize_comment() private X-Git-Tag: v0.01~6 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=67d7b560467f2d6b762eeee33aa07e0dba290f2b;p=perl%2Fmodules%2FTest-Leaner.git Make _sanitize_comment() private --- diff --git a/lib/Test/Leaner.pm b/lib/Test/Leaner.pm index b629f6a..bc62c0c 100644 --- a/lib/Test/Leaner.pm +++ b/lib/Test/Leaner.pm @@ -106,7 +106,7 @@ sub croak { die @_, " at $file line $line.\n"; } -sub sanitize_comment { +sub _sanitize_comment { $_[0] =~ s/\n+\z//; $_[0] =~ s/#/\\#/g; $_[0] =~ s/\n/\n# /g; @@ -145,7 +145,7 @@ sub plan { $plan = SKIP_ALL; $plan_str = '1..0 # SKIP'; if (defined $value) { - sanitize_comment($value); + _sanitize_comment($value); $plan_str .= " $value" if length $value; } } else { @@ -237,7 +237,7 @@ sub skip { my $skip_str = "ok $test # skip"; if (defined $reason) { - sanitize_comment($reason); + _sanitize_comment($reason); $skip_str .= " $reason" if length $reason; } @@ -297,7 +297,7 @@ sub ok ($;$) { ++$failed; } if (defined $desc) { - sanitize_comment($desc); + _sanitize_comment($desc); $test_str .= " - $desc" if length $desc; } @@ -460,7 +460,7 @@ sub _diag_fh { return if $no_diag; my $msg = join '', map { defined($_) ? $_ : 'undef' } @_; - sanitize_comment($msg); + _sanitize_comment($msg); return unless length $msg; local $\; @@ -498,7 +498,7 @@ sub BAIL_OUT { my $bail_out_str = 'Bail out!'; if (defined $desc) { - sanitize_comment($desc); + _sanitize_comment($desc); $bail_out_str .= " $desc" if length $desc; # Two spaces } diff --git a/t/92-pod-coverage.t b/t/92-pod-coverage.t index f9c77a5..8aa1ace 100644 --- a/t/92-pod-coverage.t +++ b/t/92-pod-coverage.t @@ -22,6 +22,5 @@ all_pod_coverage_ok({ croak is_like is_unlike - sanitize_comment > ], });