This gets us to pass the new s2p test.  There were 3 problems:

   o Yet another missing %Config variable (C<perlpath>).  Is there a 
     reason s2p can't use $^X?

   o s2p was munging $0, changing the program name from "s2p.com" to "com"

   o  unfortunately you can't expect runperl to return blank lines on VMS


--- configure.com;-0    Mon Apr 15 08:34:38 2002
+++ configure.com       Mon Apr 15 16:44:12 2002
@@ -5656,6 +5656,7 @@
 $ WC "perl_root='" + perl_root + "'" ! VMS specific $trnlnm()
 $ WC "perladmin='" + perladmin + "'"
 $ WC "perllibs='" + perllibs + "'"
+$ WC "perlpath='" + "''vms_prefix':[000000]Perl''ext'" + "'"
 $ WC "perl_symbol='" + perl_symbol + "'"  ! VMS specific
 $ WC "perl_verb='" + perl_verb + "'"      ! VMS specific
 $ WC "pgflquota='" + pgflquota + "'"
--- x2p/s2p.PL;-0       Sun Apr  7 11:21:14 2002
+++ x2p/s2p.PL  Mon Apr 15 16:22:29 2002
@@ -43,7 +43,7 @@
 
 print OUT <<'!NO!SUBS!';
 
-$0 =~ s/^.*?(\w+)$/$1/;
+$0 =~ s/^.*?(\w+)[\.\w]*$/$1/;
 
 # (p)sed - a stream editor
 # History:  Aug 12 2000: Original version.
@@ -1795,7 +1795,7 @@
 #!$perlpath -w
 eval 'exec $perlpath -S \$0 \${1+"\$@"}'
   if 0;
-\$0 =~ s/^.*?(\\w+)\$/\$1/;
+\$0 =~ s/^.*?(\\w+)\[\\.\\w+\]*\$/\$1/;
 
 use strict;
 use Symbol;
--- t/x2p/s2p.t;-0      Tue Apr  9 14:33:14 2002
+++ t/x2p/s2p.t Mon Apr 15 22:36:25 2002
@@ -789,6 +789,11 @@
 # various command lines for 
 my $s2p  = File::Spec->catfile( File::Spec->updir(), 'x2p', 's2p' );
 my $psed = File::Spec->catfile( File::Spec->curdir(), 'psed' );
+if ($^O eq 'VMS') {
+  # default in the .com extenson if it's not already there
+  $s2p = VMS::Filespec::rmsexpand($s2p, '.com');
+  $psed = VMS::Filespec::rmsexpand($psed, '.com');
+}
 my $sedcmd = [ $psed, '-f', $script, $stdin ];
 my $s2pcmd = [ $s2p,  '-f', $script ];
 my $plcmd  = [ $plsed, $stdin ];
@@ -830,6 +835,10 @@
         close( IN ) || goto FAIL_BOTH;
     }
 
+    # on VMS, runperl eats blank lines to work around 
+    # spurious newlines in pipes
+    $testcase{$tc}{expect} =~ s/\n\n/\n/ if $^O eq 'VMS';
+
     # run and compare
     #
     $psedres = runperl( args => $sedcmd );
[end of patch]
-- 
____________________________________________
Craig A. Berry                           
mailto:[EMAIL PROTECTED]

"A sphere of which the center is everywhere, 
and the circumference nowhere."
    pseudo-Hermetic definition of God, 12th century

"A sphere of which the center is nowhere, and 
the circumference everywhere."
    the career of an adjunct instructor,  early 21st century

Reply via email to