X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=x2p%2Fs2p.PL;h=b0928fc32b9c6c0cdd88d70bd5260ddfbb365071;hb=0ee1060bc7f323c193867d7f04e45058f219516b;hp=7e654017b7d0756ce6567cb02bff3087db8aee6d;hpb=231bc313da16da9d626e684e44737b52da2914ce;p=p5sagit%2Fp5-mst-13.2.git diff --git a/x2p/s2p.PL b/x2p/s2p.PL index 7e65401..b0928fc 100644 --- a/x2p/s2p.PL +++ b/x2p/s2p.PL @@ -5,7 +5,7 @@ use File::Basename qw(&basename &dirname); use Cwd; use subs qw(link); -sub link { # This is a cutdown vesion of installperl:link(). +sub link { # This is a cut-down version of installperl:link(). my($from,$to) = @_; my($success) = 0; @@ -17,7 +17,6 @@ sub link { # This is a cutdown vesion of installperl:link(). : die "Couldn't link $from to $to: $!\n"; }; if ($@) { - warn $@; require File::Copy; File::Copy::copy($from, $to) ? $success++ @@ -565,7 +564,13 @@ $useEXTBRE =~ s/[^<>wWyB]//g; # gawk RE's handle these my $doAutoPrint = 1; # automatic printing of pattern space (-n => 0) my $doOpenWrite = 1; # open w command output files at start (-a => 0) my $svOpenWrite = 0; # save $doOpenWrite -my $doGenerate = $0 eq 's2p'; + +# lower case $0 below as a VMSism. The VMS build procedure creates the +# s2p file traditionally in upper case on the disk. When VMS is in a +# case preserved or case sensitive mode, $0 will be returned in the exact +# case which will be on the disk, and that is not predictable at this time. + +my $doGenerate = lc($0) eq 's2p'; # Collected and compiled script # @@ -787,7 +792,7 @@ sub makey($$$){ my $fc = substr($fr,$i,1); my $tc = substr($to,$i,1); if( exists( $tr{$fc} ) && $tr{$fc} ne $tc ){ - Warn( "ambiguos translation for character `$fc' in `y' command", + Warn( "ambiguous translation for character `$fc' in `y' command", $fl ); $error++; } @@ -1861,7 +1866,7 @@ See L<"Additional Atoms">. =over 4 -=item ambiguos translation for character `%s' in `y' command +=item ambiguous translation for character `%s' in `y' command The indicated character appears twice, with different translations. @@ -2047,9 +2052,9 @@ way you wish, provided you do not restrict others from doing the same. close OUT or die "Can't close $file: $!"; chmod 0755, $file or die "Can't reset permissions for $file: $!\n"; unlink 'psed'; -print "Linking s2p to psed.\n"; +print "Linking $file to psed.\n"; if (defined $Config{d_link}) { - link 's2p', 'psed'; + link $file, 'psed'; } else { unshift @INC, '../lib'; require File::Copy;