]> git.p6c8.net - selfforum.git/blobdiff - selfforum-cgi/shared/Mail.pm
after installing apache 1.3.19 (win) i had to patch the BEGIN-Blocks (to get the...
[selfforum.git] / selfforum-cgi / shared / Mail.pm
index e46a81c4090d59b7bfb1b6f10c1030203121a1b0..8ba56e3971587a162f4e4acd14de1f115faa8ba5 100644 (file)
@@ -18,14 +18,13 @@ use strict;
 
 package Mail;
 
-use vars qw($mailbox $mailprog @ISA @EXPORT);
+use vars qw($mailbox $mailprog @EXPORT);
 
 # ===================
 # Funktionsexport
 # ===================
 
-require Exporter;
-@ISA = qw(Exporter);
+use base qw(Exporter);
 @EXPORT = qw(is_mail_address send_mail);
 
 ########################################
@@ -186,18 +185,12 @@ sub encode_qp ($)
 
 sub get_list ($$) {
   my ($start,$list)=splice @_;
-  my $string="";
 
-  return "" unless (length($list));
-  if (ref($list)) {
-    return "" unless (@$list);
-    foreach (@$list) {
-      $string.="$start: $_\n";}}
-  else {
-    $string="$start: $list\n";}
+  return $start . ': ' . $list . "\n" if (defined $list and not ref $list and length $list);
 
-  # Rueckgabe
-  $string;
+  return $start . ': ' . join (', ',@$list) . "\n" if (ref $list);
+
+  '';
 }
 
 ##############################################

patrick-canterino.de