diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1997-04-15 00:00:00 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-04-15 00:00:00 +1200 |
commit | 137443ea0a858c43f5a720730cac6209a7d41948 (patch) | |
tree | ea114bc1f5281a6ec91ebc67e34ed7f30571daee /utils | |
parent | 683d4eee6f3b749aec29cc849f45404c6acda85e (diff) | |
download | perl-137443ea0a858c43f5a720730cac6209a7d41948.tar.gz |
[inseparable changes from patch from perl-5.003_97d to perl-5.003_97e]perl-5.003_97e
CORE LANGUAGE CHANGES
Subject: New operator: sysseek()
From: Chip Salzenberg <chip@perl.com>
Files: doio.c ext/Opcode/Makefile.PL ext/Opcode/Opcode.pm global.sym keywords.pl opcode.pl pod/perldelta.pod pod/perlfunc.pod pp_sys.c t/op/sysio.t toke.c
Subject: Allow recursive substitution again
From: Chip Salzenberg <chip@perl.com>
Files: pod/perldelta.pod pod/perldiag.pod pp_hot.c
CORE PORTABILITY
Subject: Use size_t for socket size parameters of GNU libc
From: Chip Salzenberg <chip@perl.com>
Files: doio.c pp_sys.c
Subject: Win32 update (four patches)
From: Gurusamy Sarathy <gsar@engin.umich.edu>
Files: MANIFEST README.win32 dosish.h ext/SDBM_File/Makefile.PL ext/SDBM_File/sdbm/Makefile.PL ext/SDBM_File/sdbm/sdbm.c ext/SDBM_File/sdbm/sdbm.h lib/ExtUtils/MM_Unix.pm perl.c utils/perlbug.PL utils/perldoc.PL win32/Makefile win32/TEST win32/config.H win32/config.w32 win32/config_h.PL win32/config_sh.PL win32/perllib.c win32/runperl.c win32/win32.c win32/win32io.c win32/win32sck.c
DOCUMENTATION
Subject: Add CGI to perldelta.pod and improve its description in MANIFEST
From: Chip Salzenberg <chip@perl.com>
Files: MANIFEST pod/perldelta.pod
Subject: Describe probs with majordomo 1.94.1
From: Chip Salzenberg <chip@perl.com>
Files: pod/perldelta.pod
Subject: Fix description of /\G/g
From: Chip Salzenberg <chip@perl.com>
Files: pod/perlop.pod
Subject: Mention '...' operator in precedence table
Date: Sun, 13 Apr 1997 11:24:16 -0600
From: Tom Christiansen <tchrist@perl.com>
Files: pod/perlop.pod
private-msgid: 199704131724.LAA23120@jhereg.perl.com
OTHER CORE CHANGES
Subject: New API function: perl_eval_pv()
Date: Mon, 14 Apr 1997 17:13:41 -0400
From: Doug MacEachern <dougm@opengroup.org>
Files: perl.c pod/perlcall.pod pod/perldelta.pod pod/perlembed.pod pod/perlguts.pod proto.h
private-msgid: 199704142113.RAA06823@postman.osf.org
Subject: Fix C< s//whatever/ >, which reuses old pattern
From: Chip Salzenberg <chip@perl.com>
Files: pp_hot.c regexec.c
Diffstat (limited to 'utils')
-rw-r--r-- | utils/perlbug.PL | 15 | ||||
-rw-r--r-- | utils/perldoc.PL | 37 |
2 files changed, 37 insertions, 15 deletions
diff --git a/utils/perlbug.PL b/utils/perlbug.PL index 9ac6fb4315..23acde403e 100644 --- a/utils/perlbug.PL +++ b/utils/perlbug.PL @@ -49,7 +49,7 @@ use strict; sub paraprint; -my($Version) = "1.16"; +my($Version) = "1.17"; # Changed in 1.06 to skip Mail::Send and Mail::Util if not available. # Changed in 1.07 to see more sendmail execs, and added pipe output. @@ -68,6 +68,7 @@ my($Version) = "1.16"; # Changed in 1.15 to add warnings to stop people using perlbug for non-bugs. # Also report selected environment variables. # Changed in 1.16 to include @INC, and allow user to re-edit if no changes. +# Changed in 1.17 Win32 support added. GSAR 97-04-12 # TODO: Allow the user to re-name the file on mail failure, and # make sure failure (transmission-wise) of Mail::Send is @@ -75,7 +76,7 @@ my($Version) = "1.16"; my( $file, $usefile, $cc, $address, $perlbug, $testaddress, $filename, $subject, $from, $verbose, $ed, - $fh, $me, $Is_VMS, $msg, $body, $andcc, %REP); + $fh, $me, $Is_MSWin32, $Is_VMS, $msg, $body, $andcc, %REP); Init(); @@ -102,6 +103,7 @@ sub Init { # -------- Setup -------- + $Is_MSWin32 = $^O eq 'MSWin32'; $Is_VMS = $^O eq 'VMS'; getopts("dhva:s:b:f:r:e:SCc:t"); @@ -149,12 +151,12 @@ sub Init { # Editor $ed = ( $::opt_e || $ENV{VISUAL} || $ENV{EDITOR} || $ENV{EDIT} || - ($Is_VMS ? "edit/tpu" : "vi") + ($Is_VMS ? "edit/tpu" : $Is_MSWin32 ? "notepad" : "vi") ); # My username - $me = getpwuid($<); + $me = ($Is_MSWin32 ? $ENV{'USERNAME'} : getpwuid($<)); } @@ -212,6 +214,8 @@ EOF if($::HaveUtil) { $domain = Mail::Util::maildomain(); + } elsif ($Is_MSWin32) { + $domain = $ENV{'USERDOMAIN'}; } elsif ($Is_VMS) { require Sys::Hostname; $domain = Sys::Hostname::hostname(); @@ -345,7 +349,8 @@ EOF # Generate scratch file to edit report in { - my($dir) = $Is_VMS ? 'sys$scratch:' : '/tmp/'; + my($dir) = ($Is_VMS ? 'sys$scratch:' : + ($Is_MSWin32 and $ENV{'TEMP'} ? $ENV{'TEMP'} : '/tmp/')); $filename = "bugrep0$$"; $filename++ while -e "$dir$filename"; $filename = "$dir$filename"; diff --git a/utils/perldoc.PL b/utils/perldoc.PL index feb1366ec4..129d985882 100644 --- a/utils/perldoc.PL +++ b/utils/perldoc.PL @@ -57,6 +57,7 @@ EOF use Getopt::Std; $Is_VMS = $^O eq 'VMS'; +$Is_MSWin32 = $^O eq 'MSWin32'; sub usage{ warn "@_\n" if @_; @@ -67,12 +68,13 @@ perldoc [options] PageName|ModuleName|ProgramName... perldoc [options] -f BuiltinFunction Options: - -h Display this help message. - -t Display pod using pod2text instead of pod2man and nroff. + -h Display this help message + -t Display pod using pod2text instead of pod2man and nroff + (-t is the default on win32) -u Display unformatted pod text -m Display modules file in its entirety -l Display the modules file name - -v Verbosely describe what's going on. + -v Verbosely describe what's going on PageName|ModuleName... is the name of a piece of documentation that you want to look at. You @@ -100,7 +102,11 @@ getopts("mhtluvf:") || usage; usage if $opt_h || $opt_h; # avoid -w warning -usage("only one of -t, -u, -m or -l") if $opt_t + $opt_u + $opt_m + $opt_l > 1; +if ($opt_t + $opt_u + $opt_m + $opt_l > 1) { + usage("only one of -t, -u, -m or -l") +} elsif ($Is_MSWin32) { + $opt_t = 1 unless $opt_t + $opt_u + $opt_m + $opt_l; +} if ($opt_t) { require Pod::Text; import Pod::Text; } @@ -132,7 +138,7 @@ sub containspod { local($")="/"; my(@p,$p,$cip); foreach $p (split(/\//, $file)){ - if (($Is_VMS or $^O eq 'os2') and not scalar @p) { + if (($Is_VMS or $Is_MSWin32 or $^O eq 'os2') and not scalar @p) { # VMSish filesystems don't begin at '/' push(@p,$p); next; @@ -176,8 +182,10 @@ sub containspod { if (( $ret = minus_f_nocase "$dir/$s.pod") or ( $ret = minus_f_nocase "$dir/$s.pm" and containspod($ret)) or ( $ret = minus_f_nocase "$dir/$s" and containspod($ret)) - or ( $Is_VMS and + or ( $Is_VMS and $ret = minus_f_nocase "$dir/$s.com" and containspod($ret)) + or ( $Is_MSWin32 and + $ret = minus_f_nocase "$dir/$s.bat" and containspod($ret)) or ( $ret = minus_f_nocase "$dir/pod/$s.pod") or ( $ret = minus_f_nocase "$dir/pod/$s" and containspod($ret))) { return $ret; } @@ -207,6 +215,8 @@ foreach (@pages) { for ($i = 0; $trn = $ENV{'DCL$PATH'.$i}; $i++) { push(@searchdirs,$trn); } + } elsif ($Is_MSWin32) { + push(@searchdirs, grep(-d, split(';', $ENV{'PATH'}))); } else { push(@searchdirs, grep(-d, split(':', $ENV{'PATH'}))); } @@ -241,13 +251,17 @@ if ($opt_l) { if( ! -t STDOUT ) { $no_tty = 1 } -unless($Is_VMS) { - $tmp = "/tmp/perldoc1.$$"; - push @pagers, qw( more less pg view cat ); +if ($Is_MSWin32) { + $tmp = "$ENV{TEMP}\\perldoc1.$$"; + push @pagers, qw( more< less notepad ); unshift @pagers, $ENV{PAGER} if $ENV{PAGER}; -} else { +} elsif ($Is_VMS) { $tmp = 'Sys$Scratch:perldoc.tmp1_'.$$; push @pagers, qw( most more less type/page ); +} else { + $tmp = "/tmp/perldoc1.$$"; + push @pagers, qw( more less pg view cat ); + unshift @pagers, $ENV{PAGER} if $ENV{PAGER}; } unshift @pagers, $ENV{PERLDOC_PAGER} if $ENV{PERLDOC_PAGER}; @@ -428,6 +442,9 @@ Minor updates by Andy Dougherty <doughera@lafcol.lafayette.edu> =cut # +# Version 1.12: Sat Apr 12 22:41:09 EST 1997 +# Gurusamy Sarathy <gsar@umich.edu> +# -various fixes for win32 # Version 1.11: Tue Dec 26 09:54:33 EST 1995 # Kenneth Albanowski <kjahds@kjahds.com> # -added Charles Bailey's further VMS patches, and -u switch |