From: Paul Moore Date: Wed, 25 Oct 2000 12:05:47 +0000 (+0100) Subject: Minor update to find2perl, for portability X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2305df61de56aa7ac63df86148cf0e4f5dc20cd3;p=p5sagit%2Fp5-mst-13.2.git Minor update to find2perl, for portability Message-ID: <714DFA46B9BBD0119CD000805FC1F53B012A8355@UKRUX002.rundc.uk.origin-it.com> p4raw-id: //depot/perl@7432 --- diff --git a/x2p/find2perl.PL b/x2p/find2perl.PL index 25d0135..4d74d06 100644 --- a/x2p/find2perl.PL +++ b/x2p/find2perl.PL @@ -37,6 +37,7 @@ my \$perlpath = "$Config{perlpath}"; print OUT <<'!NO!SUBS!'; use strict; use vars qw/$statdone/; +use File::Spec::Functions 'curdir'; my $startperl = "#! $perlpath -w"; # @@ -57,7 +58,7 @@ my @roots = (); while ($ARGV[0] =~ /^[^-!(]/) { push(@roots, shift); } -@roots = ('.') unless @roots; +@roots = (curdir()) unless @roots; for (@roots) { $_ = "e($_) } my $roots = join(', ', @roots); @@ -674,6 +675,7 @@ sub n { sub quote { my $string = shift; + $string =~ s/\\/\\\\/g; $string =~ s/'/\\'/g; "'$string'"; }