summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utils/perldoc.PL10
-rw-r--r--x2p/find2perl.PL4
-rw-r--r--x2p/s2p.PL10
3 files changed, 19 insertions, 5 deletions
diff --git a/utils/perldoc.PL b/utils/perldoc.PL
index 8bd6577845..cfb773e6ff 100644
--- a/utils/perldoc.PL
+++ b/utils/perldoc.PL
@@ -36,9 +36,15 @@ use strict;
# make sure creat()s are neither too much nor too little
INIT { eval { umask(0077) } } # doubtless someone has no mask
+(my \$pager = <<'/../') =~ s/\\s*\\z//;
+$Config{pager}
+/../
my \@pagers = ();
-push \@pagers, q[$Config{'pager'}] if -x q[$Config{'pager'}];
-my \$bindir = '$Config{scriptdir}';
+push \@pagers, \$pager if -x \$pager;
+
+(my \$bindir = <<'/../') =~ s/\\s*\\z//;
+$Config{scriptdir}
+/../
!GROK!THIS!
diff --git a/x2p/find2perl.PL b/x2p/find2perl.PL
index b89f01ea84..adcf42ace4 100644
--- a/x2p/find2perl.PL
+++ b/x2p/find2perl.PL
@@ -29,7 +29,9 @@ print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
-my \$perlpath = '$Config{perlpath}';
+(my \$perlpath = <<'/../') =~ s/\\s*\\z//;
+$Config{perlpath}
+/../
!GROK!THIS!
# In the following, perl variables are not expanded during extraction.
diff --git a/x2p/s2p.PL b/x2p/s2p.PL
index 6d9f8eebe5..d215781dae 100644
--- a/x2p/s2p.PL
+++ b/x2p/s2p.PL
@@ -29,8 +29,14 @@ print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
-my \$startperl = '$Config{startperl}';
-my \$perlpath = '$Config{perlpath}';
+my $startperl;
+my $perlpath;
+(\$startperl = <<'/../') =~ s/\\s*\\z//;
+$Config{startperl}
+/../
+(\$perlpath = <<'/../') =~ s/\\s*\\z//;
+$Config{perlpath}
+/../
!GROK!THIS!
# In the following, perl variables are not expanded during extraction.