]> git.vpit.fr Git - perl/modules/Test-Leaner.git/blobdiff - lib/Test/Leaner.pm
Make _sanitize_comment() private
[perl/modules/Test-Leaner.git] / lib / Test / Leaner.pm
index b629f6a8d93d377485e7303314be049fb1b4ed5e..bc62c0c54fef6228b760371bcafb425cb47fe642 100644 (file)
@@ -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
  }