X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FTest-Leaner.git;a=blobdiff_plain;f=lib%2FTest%2FLeaner.pm;h=bc62c0c54fef6228b760371bcafb425cb47fe642;hp=b629f6a8d93d377485e7303314be049fb1b4ed5e;hb=67d7b560467f2d6b762eeee33aa07e0dba290f2b;hpb=0857b9585353fe0fe98e3e1fded50f6e15b3f1f3 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 }