View | Details | Raw Unified | Return to bug 5056
Collapse All | Expand All

(-)lib/Mail/SpamAssassin/Util.pm (+9 lines)
Lines 535-541 Link Here
535
  # There's a die() in there which "shouldn't happen", but better be
535
  # There's a die() in there which "shouldn't happen", but better be
536
  # paranoid.  We'll return the unwrapped string if anything went wrong.
536
  # paranoid.  We'll return the unwrapped string if anything went wrong.
537
  my $text = $_[0] || "";
537
  my $text = $_[0] || "";
538
539
  # Text::Wrap produces spurious warnings:
540
  # [23409] warn: (?:(?<=[\s,]))* matches null string many times in regex; marked by <-- HERE in m/\G(?:(?<=[\s,]))* <-- HERE \Z/ at /usr/local/perl594/lib/5.9.4/Text/Wrap.pm line 46.
541
  # trap and ignore them.  Why do so many of the core modules do this
542
  # kind of crap? :(  use a $SIG{__WARN__} to trap it.
543
538
  eval {
544
  eval {
545
    local $SIG{__WARN__} = sub {
546
      ($_[0] =~ /matches null string many times/) or CORE::warn(@_);
547
    };
539
    $text = Text::Wrap::wrap($_[2] || "", $_[1] || "", $text);
548
    $text = Text::Wrap::wrap($_[2] || "", $_[1] || "", $text);
540
  };
549
  };
541
  return $text;
550
  return $text;

Return to bug 5056