diff options
author | Jonathan Stowe <gellyfish@gellyfish.com> | 2001-02-04 10:46:01 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-02-04 17:57:51 +0000 |
commit | 65cf46c7f56f9fe500e3dca891f7b8f583c2e6fa (patch) | |
tree | 09eb9d333be32d7a16902df423cc7a6ac470c587 | |
parent | 5b3eff12f7c4ea0bd1324f2fe0a16edec8764c93 (diff) | |
download | perl-65cf46c7f56f9fe500e3dca891f7b8f583c2e6fa.tar.gz |
Small usage change and author gueesing
Message-Id: <Pine.LNX.4.32.0102041037510.1555-100000@orpheus.gellyfish.com>
p4raw-link: @8670 on //depot/perl: ac634a9a38fe527f538270bb24c9a19cd88f5947
p4raw-id: //depot/perl@8690
-rw-r--r-- | utils/h2xs.PL | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/utils/h2xs.PL b/utils/h2xs.PL index 88ac482b55..896d05f5c8 100644 --- a/utils/h2xs.PL +++ b/utils/h2xs.PL @@ -409,10 +409,12 @@ my @ARGS = @ARGV; my $compat_version = $]; use Getopt::Std; +use Config; -sub usage{ - warn "@_\n" if @_; - die "h2xs [-ACOPXacdfhkmx] [-F addflags] [-M fmask] [-n module_name] [-o tmask] [-p prefix] [-s subs] [-v version] [headerfile [extra_libraries]] +sub usage { + warn "@_\n" if @_; + die <<EOFUSAGE; +h2xs [-ACOPXacdfhkmx] [-F addflags] [-M fmask] [-n module_name] [-o tmask] [-p prefix] [-s subs] [-v version] [-b compat_version ] [headerfile [extra_libraries]] version: $H2XS_VERSION -A Omit all autoloading facilities (implies -c). -C Omit creating the Changes file, add HISTORY heading to stub POD. @@ -438,7 +440,7 @@ version: $H2XS_VERSION extra_libraries are any libraries that might be needed for loading the extension, e.g. -lm would try to link in the math library. -"; +EOFUSAGE } @@ -960,8 +962,19 @@ print PM <<"END"; __END__ END -my $author = "A. U. Thor"; -my $email = 'a.u.thor@a.galaxy.far.far.away'; +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"; + }; + +$author ||= "A. U. Thor"; +$email ||= 'a.u.thor@a.galaxy.far.far.away'; my $revhist = ''; $revhist = <<EOT if $opt_C; |