Integrate mainline
Nick Ing-Simmons [Mon, 28 Jan 2002 08:22:36 +0000 (08:22 +0000)]
p4raw-id: //depot/perlio@14463

37 files changed:
Configure
Makefile.SH
cygwin/Makefile.SHs
cygwin/perlld.in
doio.c
ext/B/B.xs
ext/B/B/Deparse.pm
ext/B/t/showlex.t
ext/B/t/stash.t
ext/Devel/Peek/Peek.t
ext/PerlIO/t/encoding.t
installperl
lib/ExtUtils/MM_Cygwin.pm
lib/ExtUtils/MakeMaker.pm
lib/ExtUtils/t/Command.t
lib/ExtUtils/t/Embed.t
lib/ExtUtils/t/MM_Cygwin.t
lib/Pod/Text/Overstrike.pm
lib/Pod/Usage.pm
lib/Pod/t/Usage.t
lib/Pod/t/basic.t
lib/User/pwent.t
lib/locale.t
pod/perlfaq.pod
pod/perlfaq1.pod
pod/perlfaq2.pod
pod/perlfaq3.pod
pod/perlfaq4.pod
pod/perlfaq5.pod
pod/perlfaq6.pod
pod/perlfaq7.pod
pod/perlfaq8.pod
pod/perlfaq9.pod
t/op/append.t
t/op/pack.t
t/op/stat.t
t/op/ver.t

index 87d901e..4e6a731 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
 
 # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
 #
-# Generated on Thu Jan 24 16:12:51 EET 2002 [metaconfig 3.0 PL70]
+# Generated on Mon Jan 28 01:36:10 EET 2002 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.org)
 
 cat >c1$$ <<EOF
@@ -7555,8 +7555,8 @@ true)
                linux*)  # ld won't link with a bare -lperl otherwise.
                        dflt=libperl.$so
                        ;;
-               cygwin*) # include version
-                       dflt=`echo libperl$version | sed -e 's/\./_/g'`$lib_ext
+               cygwin*) # ld links against an importlib
+                       dflt=libperl$lib_ext
                        ;;
                *)      # Try to guess based on whether libc has major.minor.
                        case "$libc" in
index 9405eeb..77ed8fe 100644 (file)
@@ -105,6 +105,11 @@ case "`pwd`" in
 *" "*) ldlibpth=`echo $ldlibpth|sed 's/ /\\\\ /g'` ;;
 esac
 
+case "$osname" in
+os390) test -f /bin/env && ldlibpth="/bin/env $ldlibpth"
+       ;;
+esac
+
 : Prepare dependency lists for Makefile.
 dynamic_list=' '
 for f in $dynamic_ext; do
index 3738390..ffe4815 100644 (file)
@@ -81,12 +81,6 @@ perlld: $& Makefile ${src}/cygwin/perlld.in
 # make sure that all library names are not malformed
 libperl=`echo $libperl|sed -e s,\\\..*,,`
 
-# it would be nice to allow dll to have any name,
-# but for now i insist on 'lib<whatever>.dll'
-if ( ! ( echo $libperl | grep '^lib' >/dev/null ) )
-then
-  libperl=lib$libperl
-fi
 linklibperl=-l`echo $libperl|sed -e s,^lib,,`
 
 $spitshell >>Makefile <<!GROK!THIS!
@@ -108,11 +102,11 @@ perlmain$(OBJ_EXT): perlmain.c
 
 # library used to make statically linked executables
 # miniperl is linked against it to avoid libperl.dll locking
-$(LIBPERL)s$(LIB_EXT): $& perl$(OBJ_EXT) $(cwobj)
+$(LIBPERL)$(LIB_EXT): $& perl$(OBJ_EXT) $(cwobj)
        $(AR) rcu $@ perl$(OBJ_EXT) $(cwobj)
 
 # dll and import library
-$(LIBPERL)$(LIB_EXT): $& perl$(OBJ_EXT) $(cwobj) ld2
+$(LIBPERL).dll$(LIB_EXT): $& perl$(OBJ_EXT) $(cwobj) ld2
        $(LDLIBPTH) ld2 $(SHRPLDFLAGS) -o $(LIBPERL)$(DLSUFFIX) \
        perl$(OBJ_EXT) $(cwobj) $(libs)
 
@@ -125,10 +119,23 @@ $(LIBPERL)$(LIB_EXT): $& perl$(OBJ_EXT) $(cwobj) ld2
 # The Module used here must not depend on Config or any extensions.
 
 miniperl.exe \
-miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL)s$(LIB_EXT) opmini$(OBJ_EXT)
-       $(LDLIBPTH) $(CC) $(CLDFLAGS) -o miniperl miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(LLIBPERL)s $(libs)
+miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) opmini$(OBJ_EXT)
+       $(LDLIBPTH) $(CC) $(CLDFLAGS) -o miniperl miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(LLIBPERL) $(libs)
        $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
 
+perl.exe \
+perl: $& perlmain$(OBJ_EXT) $(LIBPERL).dll$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
+       $(SHRPENV) $(LDLIBPTH) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
+
+pureperl: $& perlmain$(OBJ_EXT) $(LIBPERL).dll$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
+       $(SHRPENV) $(LDLIBPTH) purify $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o pureperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
+
+purecovperl: $& perlmain$(OBJ_EXT) $(LIBPERL).dll$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
+       $(SHRPENV) $(LDLIBPTH) purecov $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o purecovperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
+
+quantperl: $& perlmain$(OBJ_EXT) $(LIBPERL).dll$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
+       $(SHRPENV) $(LDLIBPTH) quantify $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o quantperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
+
 !NO!SUBS!
        ;;
 *)
@@ -152,6 +159,19 @@ miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) opmini$(OBJ_EXT)
        $(LDLIBPTH) $(CC) $(CLDFLAGS) -o miniperl miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(LLIBPERL) $(libs)
        $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
 
+perl.exe \
+perl: $& perlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
+       $(SHRPENV) $(LDLIBPTH) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) -Wl,-Bstatic $(LLIBPERL) -Wl,-Bdynamic `cat ext.libs` $(libs)
+
+pureperl: $& perlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
+       $(SHRPENV) $(LDLIBPTH) purify $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o pureperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
+
+purecovperl: $& perlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
+       $(SHRPENV) $(LDLIBPTH) purecov $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o purecovperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
+
+quantperl: $& perlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
+       $(SHRPENV) $(LDLIBPTH) quantify $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o quantperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
+
 !NO!SUBS!
        ;;
 esac
@@ -166,18 +186,6 @@ esac
 #
 $spitshell >>Makefile <<'!NO!SUBS!'
 
-perl.exe \
-perl: $& perlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
-       $(SHRPENV) $(LDLIBPTH) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) -Wl,-Bstatic $(LLIBPERL) -Wl,-Bdynamic `cat ext.libs` $(libs)
-
-pureperl: $& perlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
-       $(SHRPENV) $(LDLIBPTH) purify $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o pureperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
-
-purecovperl: $& perlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
-       $(SHRPENV) $(LDLIBPTH) purecov $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o purecovperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
-
-quantperl: $& perlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
-       $(SHRPENV) $(LDLIBPTH) quantify $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o quantperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
 
 !NO!SUBS!
 
index 19a1a2f..90a21bb 100644 (file)
@@ -3,19 +3,14 @@
 #   to be built, special processing is done, else the standard ld is called.
 #
 
-# theese are pretty mandatory
+# these are pretty mandatory
 my $CC = '@CC@';
-my $DLLWRAP = '@DLLWRAP@';
-
-# following are optional.
-my $WRAPDRIVER = '@WRAPDRIVER@';
-my $AS = '@AS@';
-my $DLLTOOL = '@DLLTOOL@';
 my $EXPORT_ALL = @EXPORT_ALL@;
+
 # if some of extensions are undefined,
 # no corresponding output will be done.
 # most probably, you'd like to have an export library
-my $DEF_EXT = '@DEF_EXT@';
+# my $DEF_EXT = '@DEF_EXT@';
 # my $EXP_EXT = '@EXP_EXT@';
 my $LIB_EXT = '@LIB_EXT@';
 
@@ -51,27 +46,30 @@ if ($args !~ /\-o (\S+)/) {
     $path =~ s,[/\\](\.[/\\])*,/,g;
   }
   if ($dllname =~ /\./) { $libname =$`; } else { $libname =$dllname; };
+  my $v_e_r_s = '5_7_2';
+  if ( $dllname =~ /.*perl.*/) { 
+    $dllname ="cygperl$v_e_r_s.dll";
+  } else {
   $dllname ="$libname.dll";
+  }
   $libname ="lib$libname" unless ($libname =~ /^lib/);
   print DEBUGFILE "dll name: $dllname\nimport library: $libname\npath: $path\n" if $DEBUG;
 
-  $command ="$DLLWRAP --dllname $dllname";
-  $command .=" --driver-name $WRAPDRIVER" if $WRAPDRIVER;
-  $command .=" --dlltool $DLLTOOL" if $DLLTOOL;
-  $command .=" --export-all-symbols" if $EXPORT_ALL;
-  $command .=" --as $AS" if $AS;
-  $command .=" --verbose" if $verbose;
+  $command ="$CC -shared -o  $dllname";
+#  $command .=" --verbose" if $verbose;
 
-  $command .=" --output-def $libname$DEF_EXT" if $DEF_EXT;
-  $command .=" --output-exp $libname$EXP_EXT" if $EXP_EXT;
-  $command .=" --output-lib $libname$LIB_EXT" if $LIB_EXT;
+  $command .=" -Wl,--output-def=$libname$DEF_EXT" if $DEF_EXT;
+  $command .=" -Wl,--output-exp=$libname$EXP_EXT" if $EXP_EXT;
+  $command .=" -Wl,--out-implib=$libname.dll$LIB_EXT" if $LIB_EXT;
+  $command .=" -Wl,--export-all-symbols" if $EXPORT_ALL;
+  $command .=" -Wl,--enable-auto-import -Wl,--stack,67108864"; # always
 
   # other args are passed through
   shellexec("$command \\\n$args\n");
 
   if ($path) {
     $command ="mv $dllname";
-    $command .=" $libname$LIB_EXT" if $LIB_EXT;
+    $command .=" $libname.dll$LIB_EXT" if $LIB_EXT;
     shellexec("$command $path\n");
   };
 };
diff --git a/doio.c b/doio.c
index ca15cd7..ab74d4a 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -140,18 +140,44 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
     if (as_raw) {
         /* sysopen style args, i.e. integer mode and permissions */
        STRLEN ix = 0;
-       if (num_svs != 0) {
-            Perl_croak(aTHX_ "panic: sysopen with multiple args");
-       }
-       if (rawmode & (O_WRONLY|O_RDWR|O_CREAT
+       int appendtrunc =
+            0
 #ifdef O_APPEND        /* Not fully portable. */
-                      |O_APPEND
+            |O_APPEND
 #endif
 #ifdef O_TRUNC /* Not fully portable. */
-                      |O_TRUNC
+            |O_TRUNC
 #endif
-                      ))
-           TAINT_PROPER("sysopen");
+            ;
+       int modifyingmode =
+            O_WRONLY|O_RDWR|O_CREAT|appendtrunc;
+       int ismodifying;
+
+       if (num_svs != 0) {
+            Perl_croak(aTHX_ "panic: sysopen with multiple args");
+       }
+       /* It's not always
+
+          O_RDONLY 0
+          O_WRONLY 1
+          O_RDWR   2
+
+          It might be (in OS/390 and Mac OS Classic it is)
+
+          O_WRONLY 1
+          O_RDONLY 2
+          O_RDWR   3
+
+          This means that simple & with O_RDWR would look
+          like O_RDONLY is present.  Therefore we have to
+          be more careful.
+       */
+       if ((ismodifying = (rawmode & modifyingmode))) {
+            if ((ismodifying & O_WRONLY) == O_WRONLY ||
+                (ismodifying & O_RDWR)   == O_RDWR   ||
+                (ismodifying & (O_CREAT|appendtrunc)))
+                 TAINT_PROPER("sysopen");
+       }
        mode[ix++] = '#'; /* Marker to openn to use numeric "sysopen" */
 
 #if defined(USE_64_BIT_RAWIO) && defined(O_LARGEFILE)
index 9b7fa9d..c731c98 100644 (file)
@@ -251,7 +251,11 @@ cstring(pTHX_ SV *sv)
                 sprintf(escbuff, "\\%03o", '?');
                 sv_catpv(sstr, escbuff);
             }
-           else if (*s >= ' ' && *s < 127) /* XXX not portable */
+#ifdef EBCDIC
+           else if (isPRINT(*s))
+#else
+           else if (*s >= ' ' && *s < 127)
+#endif /* EBCDIC */
                sv_catpvn(sstr, s, 1);
            else if (*s == '\n')
                sv_catpv(sstr, "\\n");
@@ -292,7 +296,11 @@ cchar(pTHX_ SV *sv)
        sv_catpv(sstr, "\\'");
     else if (*s == '\\')
        sv_catpv(sstr, "\\\\");
-    else if (*s >= ' ' && *s < 127) /* XXX not portable */
+#ifdef EBCDIC
+    else if (isPRINT(8s))
+#else
+    else if (*s >= ' ' && *s < 127)
+#endif /* EBCDIC */
        sv_catpvn(sstr, s, 1);
     else if (*s == '\n')
        sv_catpv(sstr, "\\n");
index a0f0e78..fe1dc10 100644 (file)
@@ -490,6 +490,8 @@ sub new {
            $self->{'files'}{$1} = 1;
        } elsif ($arg eq "-p") {
            $self->{'parens'} = 1;
+       } elsif ($arg eq "-P") {
+           $self->{'noproto'} = 1;
        } elsif ($arg eq "-l") {
            $self->{'linenums'} = 1;
        } elsif ($arg eq "-q") {
@@ -2779,6 +2781,7 @@ sub method {
 # or ("", $args_after_prototype_demunging) if it does.
 sub check_proto {
     my $self = shift;
+    return "&" if $self->{'noproto'};
     my($proto, @args) = @_;
     my($arg, $real);
     my $doneok = 0;
@@ -3071,7 +3074,7 @@ sub re_unback {
     my($str) = @_;
 
     # the insane complexity here is due to the behaviour of "\c\"
-    $str =~ s/(^|[^\\]|\\c\\)(?<!\\c)\\(\\\\)*(?=[\0-\031\177-\377])/$1$2/g;
+    $str =~ s/(^|[^\\]|\\c\\)(?<!\\c)\\(\\\\)*(?=[^[:print:]])/$1$2/g;
     return $str;
 }
 
@@ -3781,6 +3784,22 @@ C<B::Deparse,-p> will print
 which probably isn't what you intended (the C<'???'> is a sign that
 perl optimized away a constant value).
 
+=item B<-P>
+
+Disable prototype checking. With this option, all function calls are
+deparsed as if no prototype was defined for them. In other words,
+
+    perl -MO=Deparse,-P -e 'sub foo (\@) { 1 } foo @x'
+
+will print
+
+    sub foo (\@) {
+       1;
+    }
+    &foo(\@x);
+
+making clear how the parameters are actually passed to C<foo>.
+
 =item B<-q>
 
 Expand double-quoted strings into the corresponding combinations of
index 1322235..afff12e 100755 (executable)
@@ -33,11 +33,6 @@ if ($is_thread) {
     print "# use5005threads: test $test skipped\n";
 } else {
     $a = `$^X $path "-MO=Showlex" -e "my \@one" $redir`;
-    if (ord('A') != 193) { # ASCIIish
-        print "# [$a]\nnot " unless $a =~ /sv_undef.*PVNV.*\@one.*sv_undef.*AV/s;
-    }
-    else { # EBCDICish C<1: PVNV (0x1a7ede34) "@\226\225\205">
-        print "# [$a]\nnot " unless $a =~ /sv_undef.*PVNV.*\@\\[0-9].*sv_undef.*AV/s;
-    }
+    print "# [$a]\nnot " unless $a =~ /sv_undef.*PVNV.*\@one.*sv_undef.*AV/s;
 }
 ok;
index 0a32a18..f8b5209 100755 (executable)
@@ -21,7 +21,7 @@ my $test = 1;
 sub ok { print "ok $test\n"; $test++ }
 
 
-my $a;
+my $got;
 my $Is_VMS = $^O eq 'VMS';
 my $Is_MacOS = $^O eq 'MacOS';
 
@@ -29,34 +29,54 @@ my $path = join " ", map { qq["-I$_"] } @INC;
 $path = '"-I../lib" "-Iperl_root:[lib]"' if $Is_VMS;   # gets too long otherwise
 my $redir = $Is_MacOS ? "" : "2>&1";
 
+chomp($got = `$^X $path "-MB::Stash" "-Mwarnings" -e1`);
+
+$got =~ s/-u//g;
+
+print "# got = $got\n";
+
+my @got = map { s/^\S+ //; $_ }
+              sort { $a cmp $b }
+                   map { lc($_) . " " . $_ }
+                       split /,/, $got;
+
+print "# (after sorting)\n";
+print "# got = @got\n";
+
+@got = grep { ! /^(PerlIO|open)(?:::\w+)?$/ } @got;
+
+print "# (after perlio censorings)\n";
+print "# got = @got\n";
+
+@got = grep { ! /^Win32$/                     } @got  if $^O eq 'MSWin32';
+@got = grep { ! /^NetWare$/                   } @got  if $^O eq 'NetWare';
+@got = grep { ! /^(Cwd|File|File::Copy|OS2)$/ } @got  if $^O eq 'os2';
+@got = grep { ! /^Cwd$/                       } @got  if $^O eq 'cygwin';
 
-chomp($a = `$^X $path "-MB::Stash" "-Mwarnings" -e1`);
-$a = join ',', sort split /,/, $a;
-$a =~ s/-u(PerlIO|open)(?:::\w+)?,//g;
-$a =~ s/-uWin32,// if $^O eq 'MSWin32';
-$a =~ s/-uNetWare,// if $^O eq 'NetWare';
-$a =~ s/-u(Cwd|File|File::Copy|OS2),//g if $^O eq 'os2';
-$a =~ s/-uCwd,// if $^O eq 'cygwin';
-  $b = '-uCarp,-uCarp::Heavy,-uDB,-uExporter,-uExporter::Heavy,-uaccess,-uattributes,'
-     . '-umain,-uutf8,-uwarnings';
 if ($Is_VMS) {
-    $a =~ s/-uFile,-uFile::Copy,//;
-    $a =~ s/-uVMS,-uVMS::Filespec,//;
-    $a =~ s/-uvmsish,//;
-    $a =~ s/-uSocket,//; # Socket is optional/compiler version dependent
+    @got = grep { ! /^File(?:::Copy)?$/    } @got;
+    @got = grep { ! /^VMS(?:::Filespec)?$/ } @got;
+    @got = grep { ! /^vmsish$/             } @got;
+     # Socket is optional/compiler version dependent
+    @got = grep { ! /^Socket$/             } @got;
 }
 
+print "# (after platform censorings)\n";
+print "# got = @got\n";
+
+$got = "@got";
+
+my $expected = "access attributes Carp Carp::Heavy DB Exporter Exporter::Heavy main utf8 warnings";
+
 {
     no strict 'vars';
     use vars '$OS2::is_aout';
 }
+
 if ((($Config{static_ext} eq ' ') || ($Config{static_ext} eq ''))
     && !($^O eq 'os2' and $OS2::is_aout)
        ) {
-    if (ord('A') == 193) { # EBCDIC sort order is qw(a A) not qw(A a)
-       $b = join ',', sort split /,/, $b;
-    }
-    print "# [$a]\n# vs.\n# [$b]\nnot " if $a ne $b;
+    print "# [$got]\n# vs.\n# [$expected]\nnot " if $got ne $expected;
     ok;
 } else {
     print "ok $test # skipped: one or more static extensions\n"; $test++;
index 9be948c..bd42d93 100644 (file)
@@ -357,7 +357,7 @@ do_test(19,
     MAX = 7
     RITER = -1
     EITER = $ADDR
-    Elt "\\\241\\\101" \[UTF8 "\\\x\{100\}"\] HASH = $ADDR
+    Elt "\\\214\\\101" \[UTF8 "\\\x\{100\}"\] HASH = $ADDR
     SV = PV\\($ADDR\\) at $ADDR
       REFCNT = 1
       FLAGS = \\(POK,pPOK,UTF8\\)
index eb523ca..a8550d5 100644 (file)
@@ -35,8 +35,13 @@ if (open(GRK, ">$grk")) {
 }
 
 if (open(UTF, "<$utf")) {
-    # alpha beta gamma in UTF-8 Unicode (0x3b1 0x3b2 0x3b3)
-    print "not " unless <UTF> eq "\xce\xb1\xce\xb2\xce\xb3";
+    if (ord('A') == 193) { # EBCDIC
+       # alpha beta gamma in UTF-EBCDIC Unicode (0x3b1 0x3b2 0x3b3)
+       print "not " unless <UTF> eq "\xb4\x58\xb4\x59\xb4\x62";
+    } else {
+       # alpha beta gamma in UTF-8 Unicode (0x3b1 0x3b2 0x3b3)
+       print "not " unless <UTF> eq "\xce\xb1\xce\xb2\xce\xb3";
+    }
     print "ok 4\n";
     close UTF;
 }
@@ -86,11 +91,14 @@ if (open(RUSSKI, ">$russki")) {
     my $buf2;
     read(RUSSKI, $buf2, 1);
     my $offset = tell(RUSSKI);
-    if (ord($buf1) == 0x3c && ord($buf2) == 0x3f && $offset == 2) {
+    if (ord($buf1) == 0x3c &&
+       ord($buf2) == (ord('A') == 193) ? 0x6f : 0x3f &&
+       $offset == 2) {
        print "ok 11\n";
     } else {
-       printf "not ok 11 # %#x %#x %d\n",
-              ord($buf1), ord($buf2), $offset;
+       printf "not ok 11 # [%s] [%s] %d\n",
+              join(" ", unpack("H*", $buf1)),
+              join(" ", unpack("H*", $buf2)), $offset;
     }
     close(RUSSKI);
 } else {
index c18fd6a..6b702bd 100755 (executable)
@@ -234,7 +234,9 @@ if (($Is_W32 and ! $Is_NetWare)  or $Is_Cygwin) {
 
   if ($Is_Cygwin) {
     $perldll = $libperl;
-    $perldll =~ s/(\..*)?$/.$dlext/;
+    my $v_e_r_s = $ver; $v_e_r_s =~ tr/./_/;
+    $perldll =~ s/(\..*)?$/$v_e_r_s.$dlext/;
+    $perldll =~ s/^lib/cyg/;
     if ($Config{useshrplib} eq 'true') {
       # install ld2 and perlld as well
       foreach ('ld2', 'perlld') {
@@ -242,6 +244,18 @@ if (($Is_W32 and ! $Is_NetWare)  or $Is_Cygwin) {
         copy("$_", "$installbin/$_");
         chmod(0755, "$installbin/$_");
       };
+      { 
+               open (LD2, ">$installbin/ld2");
+               print LD2 "#!/bin/sh\n#\n# ld wrapper, passes all args to perlld;\n#\n"
+                         . "for trythis in $installbin/perl\ndo\n  if [ -x \$trythis ]\n"
+                         . "  then\n    \$trythis $installbin/perlld \"\$\@\"\n"
+                         . "    exit \$?\n  fi\ndone\n# hard luck!\necho i see no perl"
+                         . " executable around there\necho perl is required to build "
+                         . "dynamic libraries\necho look if the path to perl in /bin/ld2"
+                         . " is correct\nexit 1\n";
+               close LD2;
+      };
+      chmod(0755, "$installbin/ld2");
     };
   } else {
     $perldll = 'perl57.' . $dlext;
index 3d03d32..50463fb 100644 (file)
@@ -86,7 +86,14 @@ q[-e 'next if -e $$m{$$_} && -M $$m{$$_} < -M $$_ && -M $$m{$$_} < -M "],
 
 sub perl_archive
 {
+ if ($Config{useshrplib} eq 'true')
+ {
+   my $libperl = '$(PERL_INC)' .'/'. "$Config{libperl}";
+   $libperl =~ s/a$/dll.a/;
+   return $libperl;
+ } else {
  return '$(PERL_INC)' .'/'. ("$Config{libperl}" or "libperl.a");
+ }
 }
 
 1;
index 435d984..d76dbef 100644 (file)
@@ -68,7 +68,7 @@ my $Is_OS2     = $^O eq 'os2';
 my $Is_Mac     = $^O eq 'MacOS';
 my $Is_Win32   = $^O eq 'MSWin32';
 my $Is_Cygwin  = $^O eq 'cygwin';
-my $Is_NetWare = $Config{osname} eq 'NetWare';
+my $Is_NetWare = $Config{osname} eq 'NetWare'; # $Config{osname} intentional
 my $Is_BeOS    = $^O =~ /beos/i;    # XXX should this be that loose?
 
 require ExtUtils::MM_Unix;
index 1127e12..c4f9fd2 100644 (file)
@@ -103,7 +103,7 @@ BEGIN {
 SKIP: {
        if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' ||
            $^O eq 'NetWare' || $^O eq 'dos' || $^O eq 'cygwin') {
-           skip( "different file permission semantics on $^O\n", 3);
+           skip( "different file permission semantics on $^O", 3);
        }
 
        # change a file to execute-only
index bf2d3e7..e3869dc 100644 (file)
@@ -88,11 +88,10 @@ if ($^O eq 'VMS') {
         s!-bE:(\S+)!-bE:$perl_exp!;
     }
    }
-   elsif ($^O eq 'cygwin') { # Cygwin needs the libperl copied
+   elsif ($^O eq 'cygwin') { # Cygwin needs the shared libperl copied
      my $v_e_r_s = $Config{version};
      $v_e_r_s =~ tr/./_/;
-     system("cp ../libperl$v_e_r_s.dll ./");    # for test 1
-     system("cp ../$Config{'libperl'} ../libperl.a");    # for test 1
+     system("cp ../cygperl$v_e_r_s.dll ./");    # for test 1
    }
    elsif ($Config{'libperl'} !~ /\Alibperl\./) {
      # Everyone needs libperl copied if it's not found by '-lperl'.
@@ -129,8 +128,7 @@ print (($status? 'not ':'')."ok 9 # $status\n");
 unlink($exe,"embed_test.c",$obj);
 unlink("$exe$Config{exe_ext}") if $skip_exe;
 unlink("embed_test.map","embed_test.lis") if $^O eq 'VMS';
-unlink(glob("./libperl*.dll")) if $^O eq 'cygwin';
-unlink("../libperl.a")         if $^O eq 'cygwin';
+unlink(glob("./*.dll")) if $^O eq 'cygwin';
 unlink($testlib)              if $libperl_copied;
 
 # gcc -g -I.. -L../ -o perl_test perl_test.c -lperl `../perl -I../lib -MExtUtils::Embed -I../ -e ccopts -e ldopts`
index 08b6246..df29ae2 100644 (file)
@@ -90,6 +90,7 @@ like( $res, qr/bar \\\n\t1 \\\n\tfoo/, '... should join MAN1PODS and MAN3PODS');
 
 # test perl_archive
 my $libperl = $Config{libperl} || 'libperl.a';
+$libperl =~ s/.a/.dll.a/;
 is( $args->perl_archive(), "\$(PERL_INC)/$libperl",
        'perl_archive() should respect libperl setting' );
 
index 7e23c0d..bd4c379 100644 (file)
@@ -1,5 +1,5 @@
 # Pod::Text::Overstrike -- Convert POD data to formatted overstrike text
-# $Id: Overstrike.pm,v 1.6 2001/11/28 01:16:54 eagle Exp $
+# $Id: Overstrike.pm,v 1.7 2002/01/28 01:55:42 eagle Exp $
 #
 # Created by Joe Smith <Joe.Smith@inwap.com> 30-Nov-2000
 #   (based on Pod::Text::Color by Russ Allbery <rra@stanford.edu>)
@@ -36,7 +36,7 @@ use vars qw(@ISA $VERSION);
 # Don't use the CVS revision as the version, since this module is also in Perl
 # core and too many things could munge CVS magic revision strings.  This
 # number should ideally be the same as the CVS revision in podlators, however.
-$VERSION = 1.06;
+$VERSION = 1.07;
 
 
 ##############################################################################
@@ -109,8 +109,8 @@ sub wrap {
     my $spaces = ' ' x $$self{MARGIN};
     my $width = $$self{width} - $$self{MARGIN};
     while (length > $width) {
-        if (s/^((?:(?:[^\n]\cH)?[^\n]){0,$width})(\Z|\s+)//
-            || s/^((?:(?:[^\n]\cH)?[^\n]){$width})//) {
+        if (s/^((?:(?:[^\n][\b])?[^\n]){0,$width})(\Z|\s+)//
+            || s/^((?:(?:[^\n][\b])?[^\n]){$width})//) {
             $output .= $spaces . $1 . "\n";
         } else {
             last;
@@ -129,8 +129,8 @@ sub wrap {
 # version.
 sub strip_format {
     my ($self, $text) = @_;
-    $text =~ s/(.)\cH\1/$1/g;
-    $text =~ s/_\cH//g;
+    $text =~ s/(.)[\b]\1/$1/g;
+    $text =~ s/_[\b]//g;
     return $text;
 }
 
index e69d460..771cff4 100644 (file)
@@ -478,7 +478,7 @@ sub pod2usage {
     unless ((ref $opts{"-input"}) || (-e $opts{"-input"})) {
         my ($dirname, $basename) = ('', $opts{"-input"});
         my $pathsep = ($^O =~ /^(?:dos|os2|MSWin32)$/) ? ";"
-                            : (($^O eq 'MacOS') ? ',' :  ":");
+                            : (($^O eq 'MacOS' || $^O eq 'VMS') ? ',' :  ":");
         my $pathspec = $opts{"-pathlist"} || $ENV{PATH} || $ENV{PERL5LIB};
 
         my @paths = (ref $pathspec) ? @$pathspec : split($pathsep, $pathspec);
index 4afbe5d..f5c7207 100644 (file)
@@ -48,16 +48,23 @@ SKIP: {
 }
 
 { # Test exit status from pod2usage()
-    my $exit = 42;
+    my $exit = ($^O eq 'VMS' ? 2 : 42);
     my $dev_null = File::Spec->devnull;
     my $args = join ", ", (
         "-verbose => 0", 
         "-exit    => $exit",
-        "-output  => q[$dev_null]",
-        "-input   => q[$0]",
+        "-output  => q{$dev_null}",
+        "-input   => q{$0}",
     );
-    my $prg = qq[pod2usage({ $args })];
-    my @cmd = ( $^X, '-I../lib',  '-MPod::Usage', '-e',  $prg );
+    my $cq = (($^O eq 'MSWin32'
+               || $^O eq 'NetWare'
+               || $^O eq 'VMS') ? '"'
+              : "");
+    my @params = ( "${cq}-I../lib$cq",  "${cq}-MPod::Usage$cq", '-e' );
+    my $prg = qq[${cq}pod2usage({ $args })$cq];
+    my @cmd = ( $^X, @params, $prg );
+
+    print "# cmd = @cmd\n";
 
     is( system( @cmd ) >> 8, $exit, 'Exit status of pod2usage()' );
 }
index 475df26..a61b4bf 100644 (file)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-# $Id: basic.t,v 1.3 2001/11/26 09:24:37 eagle Exp $
+# $Id: basic.t,v 1.4 2002/01/28 02:56:19 eagle Exp $
 #
 # basic.t -- Basic tests for podlators.
 #
@@ -49,7 +49,7 @@ print "ok 1\n";
 
 # Hard-code a few values to try to get reproducible results.
 $ENV{COLUMNS} = 80;
-$ENV{TERM}    = 'xterm';
+$ENV{TERM} = 'xterm';
 $ENV{TERMCAP} = 'xterm:co=80:do=^J:md=\E[1m:us=\E[4m:me=\E[m';
 
 # Map of translators to file extensions to find the formatted output to
@@ -77,7 +77,6 @@ for (sort keys %translators) {
         open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
         open (OUTPUT, "> out.$translators{$_}")
             or die "Cannot create out.$translators{$_}: $!\n";
-        binmode OUTPUT;
         local $_;
         while (<TMP>) { last if /^\.TH/ }
         print OUTPUT while <TMP>;
@@ -98,16 +97,19 @@ for (sort keys %translators) {
         my $output = <OUTPUT>;
         close MASTER;
         close OUTPUT;
+
+        # OS/390 is EBCDIC, which uses a different character for ESC
+        # apparently.  Try to convert so that the test still works.
+        if ($^O eq 'os390' && $_ eq 'Pod::Text::Termcap') {
+            $output =~ tr/\033/\047/;
+        }
+
         if ($master eq $output) {
             print "ok $n\n";
             unlink "out.$translators{$_}";
         } else {
-            my @master = split m/[\r\n]+/, $master;
-            my @output = split m/[\r\n]+/, $output;
             print "not ok $n\n";
             print "# Non-matching output left in out.$translators{$_}\n";
-            "@master" eq "@output" and
-               print "# But the line-end stripped versions are equal\n";
         }
     }
     $n++;
index 701c160..91a85cc 100644 (file)
@@ -32,10 +32,16 @@ print "not " unless $pwent->uid    == 0 ||
                     ($^O eq 'cygwin'  && $pwent->uid == 500); # go figure
 print "ok 2\n";
 
-print "not " unless $pwent->name   == $pwent[0];
+print "not " unless $pwent->name   eq $pwent[0];
 print "ok 3\n";
 
-print "not " unless $pwent->passwd eq $pwent[1];
+if ($^O eq 'os390') {
+    print "not "
+       unless not defined $pwent->passwd &&
+              $pwent[1] eq '0'; # go figure
+} else {
+    print "not " unless $pwent->passwd eq $pwent[1];
+}
 print "ok 4\n";
 
 print "not " unless $pwent->uid    == $pwent[2];
index 3174fe1..f90a9f1 100644 (file)
@@ -720,6 +720,7 @@ foreach $Locale (@Locale) {
        } else {
            use locale;
            no utf8;
+            my $re = qr/[\[\(\{\*\+\?\|\^\$\\]/;
 
            my @f = ();
            foreach my $x (keys %UPPER) {
@@ -728,6 +729,23 @@ foreach $Locale (@Locale) {
                print "# UPPER $x lc $y ",
                        $x =~ /$y/i ? 1 : 0, " ",
                        $y =~ /$x/i ? 1 : 0, "\n" if 0;
+               # If $x and $y contain regular expression characters
+               # AND THEY lowercase (/i) to regular expression characters,
+               # regcomp() will be mightily confused.  No, the \Q doesn't
+               # help here (maybe regex engine internal lowercasing
+               # is done after the \Q?)  An example of this happening is
+               # the bg_BG (Bulgarian) locale under EBCDIC (OS/390 USS):
+               # the chr(173) (the "[") is the lowercase of the chr(235).
+               # Similarly losing EBCDIC locales include cs_cz, cs_CZ,
+               # el_gr, el_GR, en_us.IBM-037 (!), en_US.IBM-037,
+               # et_ee, et_EE, hr_hr, hr_HR, hu_hu, hu_HU, lt_LT,
+               # mk_mk, mk_MK, nl_nl.IBM-037, nl_NL.IBM-037,
+               # pl_pl, pl_PL, ro_ro, ro_RO, ru_ru, ru_RU,
+               # sk_sk, sk_SK, sl_si, sl_SI, tr_tr, tr_TR,
+               if ($x =~ $re || $y =~ $re) {
+                   print "# Regex characters in '$x' or '$y', skipping test 117 for locale '$Locale'\n";
+                   next;
+               }
                # With utf8 both will fail since the locale concept
                # of upper/lower does not work well in Unicode.
                push @f, $x unless $x =~ /$y/i == $y =~ /$x/i;
@@ -738,6 +756,10 @@ foreach $Locale (@Locale) {
                print "# lower $x uc $y ",
                        $x =~ /$y/i ? 1 : 0, " ",
                        $y =~ /$x/i ? 1 : 0, "\n" if 0;
+               if ($x =~ $re || $y =~ $re) { # See above.
+                   print "# Regex characters in '$x' or '$y', skipping test 117 for locale '$Locale'\n";
+                   next;
+               }
                # With utf8 both will fail since the locale concept
                # of upper/lower does not work well in Unicode.
                push @f, $x unless $x =~ /$y/i == $y =~ /$x/i;
index c3fcacd..3d3b10f 100644 (file)
@@ -1,6 +1,6 @@
 =head1 NAME
 
-perlfaq - frequently asked questions about Perl ($Date: 2002/01/11 02:31:20 $)
+perlfaq - frequently asked questions about Perl ($Date: 2002/01/28 04:17:26 $)
 
 =head1 DESCRIPTION
 
@@ -1327,7 +1327,7 @@ Perl Porters.
 
 =head1 Author and Copyright Information
 
-Copyright (c) 1997-1999 Tom Christiansen and Nathan Torkington.
+Copyright (c) 1997-2002 Tom Christiansen and Nathan Torkington.
 All rights reserved.
 
 =head2 Bundled Distributions
index 249ef74..78720e7 100644 (file)
@@ -1,6 +1,6 @@
 =head1 NAME
 
-perlfaq1 - General Questions About Perl ($Revision: 1.4 $, $Date: 2002/01/18 21:00:17 $)
+perlfaq1 - General Questions About Perl ($Revision: 1.5 $, $Date: 2002/01/27 20:22:52 $)
 
 =head1 DESCRIPTION
 
@@ -96,15 +96,16 @@ See L<perlhist> for a history of Perl revisions.
 At The Second O'Reilly Open Source Software Convention, Larry Wall            
 announced Perl6 development would begin in earnest. Perl6 was an oft
 used term for Chip Salzenberg's project to rewrite Perl in C++ named
-Topaz. However, Topaz should not be confused with the nisus to rewrite
-Perl while keeping the lessons learned from other software, as well as
-Perl5, in mind.
+Topaz. However, Topaz provided valuable insights to the next version
+of Perl and its implementation, but was ultimately abandoned.   
 
-If you have a desire to help in the crusade to make Perl a better place
-then peruse the Perl6 developers page at http://www.perl.org/perl6/ and 
-get involved.
+If you want to learn more about Perl6, or have a desire to help in 
+the crusade to make Perl a better place then peruse the Perl6 developers 
+page at http://dev.perl.org/perl6/ and get involved.
 
-The first alpha release is expected by Summer 2001.
+Perl6 is not scheduled for release yet, and Perl5 will still be supported
+for quite awhile after its release. Do not wait for Perl6 to do whatever
+you need to do.
 
 "We're really serious about reinventing everything that needs reinventing."
 --Larry Wall
@@ -317,8 +318,8 @@ but the most recommendable way is to upgrade to at least Perl 5.6.1.
 
 =head1 AUTHOR AND COPYRIGHT
 
-Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002 Tom Christiansen and
-Nathan Torkington.  All rights reserved.
+Copyright (c) 1997, 1998, 1999, 2000, 2001 Tom Christiansen and Nathan
+Torkington.  All rights reserved.
 
 This documentation is free; you can redistribute it and/or modify it
 under the same terms as Perl itself.
index 17dab2a..9d2fa0c 100644 (file)
@@ -1,6 +1,6 @@
 =head1 NAME
 
-perlfaq2 - Obtaining and Learning about Perl ($Revision: 1.5 $, $Date: 2002/01/18 21:00:17 $)
+perlfaq2 - Obtaining and Learning about Perl ($Revision: 1.6 $, $Date: 2002/01/25 21:22:22 $)
 
 =head1 DESCRIPTION
 
@@ -197,9 +197,9 @@ including setting the Followup-To header line to NOT include alt.sources;
 see their FAQ (http://www.faqs.org/faqs/alt-sources-intro/) for details.
 
 If you're just looking for software, first use Google
-(http://www.google.com), Deja (http://www.deja.com), and
-CPAN Search (http://search.cpan.org).  This is faster and more
-productive than just posting a request.
+(http://www.google.com), Google's usenet search interface
+(http://groups.google.com),  and CPAN Search (http://search.cpan.org).  
+This is faster and more productive than just posting a request.
 
 =head2 Perl Books
 
@@ -526,7 +526,7 @@ the I<What is CPAN?> question earlier in this document.
 
 =head1 AUTHOR AND COPYRIGHT
 
-Copyright (c) 1997-2002 Tom Christiansen and Nathan Torkington.
+Copyright (c) 1997-2001 Tom Christiansen and Nathan Torkington.
 All rights reserved.
 
 This documentation is free; you can redistribute it and/or modify it
index 5a4e650..012be9c 100644 (file)
@@ -1,6 +1,6 @@
 =head1 NAME
 
-perlfaq3 - Programming Tools ($Revision: 1.11 $, $Date: 2002/01/11 02:31:20 $)
+perlfaq3 - Programming Tools ($Revision: 1.12 $, $Date: 2002/01/28 04:17:26 $)
 
 =head1 DESCRIPTION
 
@@ -921,7 +921,7 @@ information, see L<ExtUtils::MakeMaker>.
 
 =head1 AUTHOR AND COPYRIGHT
 
-Copyright (c) 1997-1999 Tom Christiansen and Nathan Torkington.
+Copyright (c) 1997-2002 Tom Christiansen and Nathan Torkington.
 All rights reserved.
 
 This documentation is free; you can redistribute it and/or modify it
index 9d19337..d5622ce 100644 (file)
@@ -1,6 +1,6 @@
 =head1 NAME
 
-perlfaq4 - Data Manipulation ($Revision: 1.11 $, $Date: 2002/01/11 02:31:20 $)
+perlfaq4 - Data Manipulation ($Revision: 1.12 $, $Date: 2002/01/28 04:17:26 $)
 
 =head1 DESCRIPTION
 
@@ -1965,7 +1965,7 @@ the PDL module from CPAN instead--it makes number-crunching easy.
 
 =head1 AUTHOR AND COPYRIGHT
 
-Copyright (c) 1997-1999 Tom Christiansen and Nathan Torkington.
+Copyright (c) 1997-2002 Tom Christiansen and Nathan Torkington.
 All rights reserved.
 
 This documentation is free; you can redistribute it and/or modify it
index fb0274e..f93b624 100644 (file)
@@ -1,6 +1,6 @@
 =head1 NAME
 
-perlfaq5 - Files and Formats ($Revision: 1.7 $, $Date: 2002/01/11 02:31:20 $)
+perlfaq5 - Files and Formats ($Revision: 1.8 $, $Date: 2002/01/28 04:17:26 $)
 
 =head1 DESCRIPTION
 
@@ -1176,7 +1176,7 @@ If your array contains lines, just print them:
 
 =head1 AUTHOR AND COPYRIGHT
 
-Copyright (c) 1997-1999 Tom Christiansen and Nathan Torkington.
+Copyright (c) 1997-2002 Tom Christiansen and Nathan Torkington.
 All rights reserved.
 
 This documentation is free; you can redistribute it and/or modify it
index 6bca283..1c878af 100644 (file)
@@ -1,6 +1,6 @@
 =head1 NAME
 
-perlfaq6 - Regexes ($Revision: 1.6 $, $Date: 2002/01/01 22:26:45 $)
+perlfaq6 - Regexes ($Revision: 1.7 $, $Date: 2002/01/28 04:17:26 $)
 
 =head1 DESCRIPTION
 
@@ -728,7 +728,7 @@ in L<perlre>.
 
 =head1 AUTHOR AND COPYRIGHT
 
-Copyright (c) 1997-1999 Tom Christiansen and Nathan Torkington.
+Copyright (c) 1997-2002 Tom Christiansen and Nathan Torkington.
 All rights reserved.
 
 This documentation is free; you can redistribute it and/or modify it
index 69bc17f..77886ab 100644 (file)
@@ -1,6 +1,6 @@
 =head1 NAME
 
-perlfaq7 - Perl Language Issues ($Revision: 1.5 $, $Date: 2002/01/01 22:26:45 $)
+perlfaq7 - Perl Language Issues ($Revision: 1.6 $, $Date: 2002/01/28 04:17:26 $)
 
 =head1 DESCRIPTION
 
@@ -892,7 +892,7 @@ you probably only want to use hard references.
 
 =head1 AUTHOR AND COPYRIGHT
 
-Copyright (c) 1997-1999 Tom Christiansen and Nathan Torkington.
+Copyright (c) 1997-2002 Tom Christiansen and Nathan Torkington.
 All rights reserved.
 
 This documentation is free; you can redistribute it and/or modify it
index 1b1ab58..cc2f072 100644 (file)
@@ -1,6 +1,6 @@
 =head1 NAME
 
-perlfaq8 - System Interaction ($Revision: 1.5 $, $Date: 2002/01/11 02:31:20 $)
+perlfaq8 - System Interaction ($Revision: 1.6 $, $Date: 2002/01/28 04:17:27 $)
 
 =head1 DESCRIPTION
 
@@ -1088,7 +1088,7 @@ but other times it is not.  Modern programs C<use Socket;> instead.
 
 =head1 AUTHOR AND COPYRIGHT
 
-Copyright (c) 1997-1999 Tom Christiansen and Nathan Torkington.
+Copyright (c) 1997-2002 Tom Christiansen and Nathan Torkington.
 All rights reserved.
 
 This documentation is free; you can redistribute it and/or modify it
index cdc00d6..4b50073 100644 (file)
@@ -1,6 +1,6 @@
 =head1 NAME
 
-perlfaq9 - Networking ($Revision: 1.5 $, $Date: 2001/11/09 08:06:04 $)
+perlfaq9 - Networking ($Revision: 1.7 $, $Date: 2002/01/28 04:17:27 $)
 
 =head1 DESCRIPTION
 
@@ -48,7 +48,12 @@ systems. CGI.pm selects an appropriate newline representation
 
 =head2 My CGI script runs from the command line but not the browser.  (500 Server Error)
 
-If you can demonstrate that you've read the FAQs and that 
+Several things could be wrong.  You can go through the "Troubleshooting
+Perl CGI scripts" guide at
+
+       http://www.perl.org/troubleshooting_CGI.html
+
+If, after that, you can demonstrate that you've read the FAQs and that 
 your problem isn't something simple that can be easily answered, you'll
 probably receive a courteous and useful reply to your question if you
 post it on comp.infosystems.www.authoring.cgi (if it's something to do
@@ -607,7 +612,7 @@ an RPC stub generator and includes an RPC::ONC module.
 
 =head1 AUTHOR AND COPYRIGHT
 
-Copyright (c) 1997-1999 Tom Christiansen and Nathan Torkington.
+Copyright (c) 1997-2002 Tom Christiansen and Nathan Torkington.
 All rights reserved.
 
 This documentation is free; you can redistribute it and/or modify it
index 171ed0f..2cb6ab8 100755 (executable)
@@ -35,46 +35,40 @@ if ($_ eq 'abcdef') {print "ok 3\n";} else {print "not ok 3\n";}
 
 # test that nul bytes get copied
 {
-# Character 'b' occurs at codepoint 130 decimal or \202 octal
-# under an EBCDIC coded character set.
-#    my($a, $ab) = ("a", "a\000b");
-    my($a, $ab) = ("\141", "\141\000\142");
-    my($u, $ub) = map pack("U0a*", $_), $a, $ab;
+    my ($a, $ab) = ("a", "a\0b");
+    my ($u, $ub) = map pack("U0a*", $_), $a, $ab;
+
+    my $c = $u eq $a ? 'b' : pack("U0a*", 'b');
+
     my $t1 = $a; $t1 .= $ab;
-    print $t1 =~ /\142/ ? "ok 6\n" : "not ok 6\t# $t1\n";
+
+    print $t1 =~ /$c/ ? "ok 6\n" : "not ok 6\t# $t1\n";
+    
     my $t2 = $a; $t2 .= $ub;
-    if (ord('A') == 193) {
-        # print $t2 eq "\141\141\000" ? "ok 7\n" : "not ok 7\t# $t2\n";
-        print eval '$t2 =~ /\141/' ? "ok 7\n" : "not ok 7\t# $t2\n";
-    }
-    else {
-        print eval '$t2 =~ /\142/' ? "ok 7\n" : "not ok 7\t# $t2\n";
-    }
+    
+    print eval '$t2 =~ /$c/' ? "ok 7\n" : "not ok 7\t# $t2\n";
+    
     my $t3 = $u; $t3 .= $ab;
-    print $t3 =~ /\142/ ? "ok 8\n" : "not ok 8\t# $t3\n";
+    
+    print $t3 =~ /$c/ ? "ok 8\n" : "not ok 8\t# $t3\n";
+    
     my $t4 = $u; $t4 .= $ub;
-    if (ord('A') == 193) {
-        print eval '$t4 =~ /\141/' ? "ok 9\n" : "not ok 9\t# $t4\n";
-    }
-    else {
-        print eval '$t4 =~ /\142/' ? "ok 9\n" : "not ok 9\t# $t4\n";
-    }
+    
+    print eval '$t4 =~ /$c/' ? "ok 9\n" : "not ok 9\t# $t4\n";
+    
     my $t5 = $a; $t5 = $ab . $t5;
-    print $t5 =~ /\142/ ? "ok 10\n" : "not ok 10\t# $t5\n";
+    
+    print $t5 =~ /$c/ ? "ok 10\n" : "not ok 10\t# $t5\n";
+    
     my $t6 = $a; $t6 = $ub . $t6;
-    if (ord('A') == 193) {
-        print eval '$t6 =~ /\141/' ? "ok 11\n" : "not ok 11\t# $t6\n";
-    }
-    else {
-        print eval '$t6 =~ /\142/' ? "ok 11\n" : "not ok 11\t# $t6\n";
-    }
+    
+    print eval '$t6 =~ /$c/' ? "ok 11\n" : "not ok 11\t# $t6\n";
+    
     my $t7 = $u; $t7 = $ab . $t7;
-    print $t7 =~ /\142/ ? "ok 12\n" : "not ok 12\t# $t7\n";
+    
+    print $t7 =~ /$c/ ? "ok 12\n" : "not ok 12\t# $t7\n";
+    
     my $t8 = $u; $t8 = $ub . $t8;
-    if (ord('A') == 193) {
-        print eval '$t8 =~ /\141/' ? "ok 13\n" : "not ok 13\t# $t8\n";
-    }
-    else {
-        print eval '$t8 =~ /\142/' ? "ok 13\n" : "not ok 13\t# $t8\n";
-    }
+    
+    print eval '$t8 =~ /$c/' ? "ok 13\n" : "not ok 13\t# $t8\n";
 }
index f6f9448..38d015b 100755 (executable)
@@ -680,17 +680,18 @@ foreach (
     # from Wolfgang Laun: fix in change #13163
 
     my $s = 'ABC' x 10;
-    my $x = 42;
+    my $t = '*';
+    my $x = ord($t);
     my $buf = pack( 'Z*/A* C',  $s, $x );
     my $y;
 
     my $h = $buf;
     $h =~ s/[^[:print:]]/./g;
     ( $s, $y ) = unpack( "Z*/A* C", $buf );
-    is($h, "30.ABCABCABCABCABCABCABCABCABCABC*");
+    is($h, "30.ABCABCABCABCABCABCABCABCABCABC$t");
     is(length $buf, 34);
     is($s, "ABCABCABCABCABCABCABCABCABCABC");
-    is($y, 42);
+    is($y, $x);
 }
 
 {
index dac954a..c3bbe83 100755 (executable)
@@ -216,8 +216,11 @@ SKIP: {
     # /dev/stdout might be either character special or a named pipe,
     # or a symlink, or a socket, depending on which OS and how are
     # you running the test, so let's censor that one away.
+    # Similar remarks hold for stderr.
     $DEV =~ s{^[cpls].+?\sstdout$}{}m;
     @DEV =  grep { $_ ne 'stdout' } @DEV;
+    $DEV =~ s{^[cpls].+?\sstderr$}{}m;
+    @DEV =  grep { $_ ne 'stderr' } @DEV;
 
     # /dev/printer is also naughty: in IRIX it shows up as
     # Srwx-----, not srwx------.
index ecfc15c..a7e57a6 100755 (executable)
@@ -32,7 +32,7 @@ else { # EBCDIC
 
     # hash keys too
     $h{v150.146} = "ok";
-    is('ok',$h{v111.107},'ASCII hash keys');
+    is('ok',$h{v150.146},'EBCDIC hash keys');
 }
 
 # poetry optimization should also