X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=x2p%2Fs2p.PL;h=4b2daa918dd190b3b2b27462e2b6a16cd45a82f5;hb=eb9bdbdff170fbef354c89f26311bc9e4a0e7245;hp=9a084f9ce5a8548cd313d2b6e838d6dfc189d6a9;hpb=d16f50bdb587818eb42f41e8f8ea1afd322f4001;p=p5sagit%2Fp5-mst-13.2.git diff --git a/x2p/s2p.PL b/x2p/s2p.PL index 9a084f9..4b2daa9 100644 --- a/x2p/s2p.PL +++ b/x2p/s2p.PL @@ -3,6 +3,27 @@ use Config; use File::Basename qw(&basename &dirname); use Cwd; +use subs qw(link); + +sub link { # This is a cut-down version of installperl:link(). + my($from,$to) = @_; + my($success) = 0; + + eval { + CORE::link($from, $to) + ? $success++ + : ($from =~ m#^/afs/# || $to =~ m#^/afs/#) + ? die "AFS" # okay inside eval {} + : die "Couldn't link $from to $to: $!\n"; + }; + if ($@) { + require File::Copy; + File::Copy::copy($from, $to) + ? $success++ + : warn "Couldn't copy $from to $to: $!\n"; + } + $success; +} # List explicitly here the variables you want Configure to # generate. Metaconfig only looks for shell variables, so you @@ -43,7 +64,7 @@ $Config{perlpath} print OUT <<'!NO!SUBS!'; -$0 =~ s/^.*?(\w+)$/$1/; +$0 =~ s/^.*?(\w+)[\.\w]*$/$1/; # (p)sed - a stream editor # History: Aug 12 2000: Original version. @@ -765,7 +786,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++; } @@ -1795,7 +1816,7 @@ if( $doGenerate ){ #!$perlpath -w eval 'exec $perlpath -S \$0 \${1+"\$@"}' if 0; -\$0 =~ s/^.*?(\\w+)\$/\$1/; +\$0 =~ s/^.*?(\\w+)\[\\.\\w+\]*\$/\$1/; use strict; use Symbol; @@ -1839,7 +1860,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.