Hi Marco,

Marco S Hyman wrote on Tue, Nov 25, 2008 at 12:18:18PM -0800:

> I noticed that majordomo now gives this warning when running the
> digest command:
>
> $* is no longer supported at /usr/local/lib/majordomo/digest line 305.
>
> I assume it started when perl was updated to 5.10.0.

Yes.
The legacy majordomo code is not fully compatible with Perl 5.10.
It uses at least one feature long deprecated and now EOL'ed.

The script "digest" is not the only one affected.
More importantly, "majordomo.pl" is also broken.

As we are still using majordomo, i'm considering to check in more
detail in order to provide patches to ports@, but i did not find the
time yet.  Then again, majordomo is long dead and has a bad license.
Perhaps it is not worth so much effort, and the time might be better
spent migrating to something else... mlmmj comes to mind...

Yours,
  Ingo

--
Ingo Schwarze <[EMAIL PROTECTED]>
Serverbetrieb usta.de / studis.de

 ----- 8< ----- schnipp ----- >8 ----- 8< ----- schnapp ----- >8 -----

    *** CAVEAT *** DISCLAIMER *** DO NOT USE BLINDLY ***
  The following is work by my colleague Jan Reusch.
  So far, it works for us, but it is probably still incomplete.
  I did not check this as thoroughly as i'm usually checking
  patches before publication, so be prepared for breakage.
  I'm only sending this now because Marco asked:
  This is only intended to demonstrate *part* of the problem,
  not to solve it.

--- alt/majordomo.pl Wed Nov  5 17:17:11 2008
+++ neu/majordomo.pl Sun Nov  2 05:00:37 2008
@@ -45,7 +45,7 @@

  sub main'ParseMailHeader  ## Public
  {
-    local($save1, $save2) = ($*, $/);
+    local($save1) = ($/);
      local($FH, *array) =  @_;
      local ($keyw, $val);

@@ -55,14 +55,14 @@
      local($package) = caller;
      $FH =~ s/^[^':]+$/$package'$&/;

-    ($*, $/) = (1, '');
+    $/ = '';
      $array = $_ = <$FH>;
-    s/\n\s+/ /g;
+    s/\n\s+/ /gms;

      @array = split('\n');
      foreach $_ (@array)
      {
-       ($keyw, $val) = m/^([^:]+):\s*(.*\S)\s*$/g;
+       ($keyw, $val) = m/^([^:]+):\s*(.*\S)\s*$/gms;
         $keyw =~ y/A-Z/a-z/;
         if (defined($array{$keyw})) {
             $array{$keyw} .= ", $val";
@@ -70,7 +70,7 @@
             $array{$keyw} = $val;
         }
      }
-    ($*, $/) = ($save1, $save2);
+    $/ = $save1;
  }

Reply via email to