Change 12589 by jhi@alpha on 2001/10/22 20:10:40

        getpwuid() fragility continues.

Affected files ...

... //depot/perl/utils/h2xs.PL#69 edit

Differences ...

==== //depot/perl/utils/h2xs.PL#69 (text) ====
Index: perl/utils/h2xs.PL
--- perl/utils/h2xs.PL.~1~      Mon Oct 22 14:15:05 2001
+++ perl/utils/h2xs.PL  Mon Oct 22 14:15:05 2001
@@ -1052,12 +1052,14 @@
 my ($email,$author);
 
 eval {
-       my $user;
-       ($user,$author) = (getpwuid($>))[0,6];
-       $author =~ s/,.*$//; # in case of sub fields
-       my $domain = $Config{'mydomain'};
-       $domain =~ s/^\.//;
-       $email = "$user\@$domain";
+       my $username;
+       ($username,$author) = (getpwuid($>))[0,6];
+       if (defined $username && defined $author) {
+          $author =~ s/,.*$//; # in case of sub fields
+          my $domain = $Config{'mydomain'};
+          $domain =~ s/^\.//;
+          $email = "$username\@$domain";
+       }
      };
 
 $author ||= "A. U. Thor";
End of Patch.

Reply via email to