summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorNicolas R <atoomic@cpan.org>2020-06-16 11:05:17 -0600
committerKarl Williamson <khw@cpan.org>2020-08-10 22:28:04 -0600
commit188e64dde7746219802c1eafb9ef48df31f65f0d (patch)
tree1ab704cd8389e5c5eb54967c07342b12f5cc140e /utils
parentab01742544b98b5b5e13d8e1a6e9df474b9e3005 (diff)
downloadperl-188e64dde7746219802c1eafb9ef48df31f65f0d.tar.gz
Provide a better recommendation for 'Run only under a shell'
Using an unset variable hides the true intent and also requires an extra backslash `\$running_under_some_shell` when used in heredoc. Note that this could also lead to mistake when using `\$` in a regular Perl program, as this would be true and not false as it should be. Stop recommending the use of an undefined variable for the shell fallback. Use '0', with a comment making clear the goal of 'if 0'.
Diffstat (limited to 'utils')
-rw-r--r--utils/corelist.PL2
-rw-r--r--utils/cpan.PL2
-rw-r--r--utils/enc2xs.PL2
-rw-r--r--utils/encguess.PL2
-rw-r--r--utils/h2ph.PL2
-rw-r--r--utils/h2xs.PL2
-rw-r--r--utils/instmodsh.PL2
-rw-r--r--utils/json_pp.PL2
-rw-r--r--utils/libnetcfg.PL2
-rw-r--r--utils/perlbug.PL2
-rw-r--r--utils/perlivp.PL2
-rw-r--r--utils/piconv.PL2
-rw-r--r--utils/pl2pm.PL2
-rw-r--r--utils/pod2html.PL2
-rw-r--r--utils/prove.PL2
-rw-r--r--utils/ptar.PL2
-rw-r--r--utils/ptardiff.PL2
-rw-r--r--utils/ptargrep.PL2
-rw-r--r--utils/shasum.PL2
-rw-r--r--utils/splain.PL2
-rw-r--r--utils/streamzip.PL2
-rw-r--r--utils/xsubpp.PL2
-rw-r--r--utils/zipdetails.PL2
23 files changed, 23 insertions, 23 deletions
diff --git a/utils/corelist.PL b/utils/corelist.PL
index d1376bef4e..fc1ba68722 100644
--- a/utils/corelist.PL
+++ b/utils/corelist.PL
@@ -28,7 +28,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
use File::Spec;
diff --git a/utils/cpan.PL b/utils/cpan.PL
index f40c1c44df..f3c430fedf 100644
--- a/utils/cpan.PL
+++ b/utils/cpan.PL
@@ -28,7 +28,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
use File::Spec;
diff --git a/utils/enc2xs.PL b/utils/enc2xs.PL
index 863ff8e9e7..790819795c 100644
--- a/utils/enc2xs.PL
+++ b/utils/enc2xs.PL
@@ -31,7 +31,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
use File::Spec;
diff --git a/utils/encguess.PL b/utils/encguess.PL
index caa908f4b0..a6c14043d5 100644
--- a/utils/encguess.PL
+++ b/utils/encguess.PL
@@ -28,7 +28,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
use File::Spec;
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index eece12ddc5..afa53c2dba 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -32,7 +32,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
# In the following, perl variables are not expanded during extraction.
diff --git a/utils/h2xs.PL b/utils/h2xs.PL
index fca1765355..50e9a00e2f 100644
--- a/utils/h2xs.PL
+++ b/utils/h2xs.PL
@@ -28,7 +28,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
# In the following, perl variables are not expanded during extraction.
diff --git a/utils/instmodsh.PL b/utils/instmodsh.PL
index a1e7b55b70..1a9af212a7 100644
--- a/utils/instmodsh.PL
+++ b/utils/instmodsh.PL
@@ -28,7 +28,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
use File::Spec;
diff --git a/utils/json_pp.PL b/utils/json_pp.PL
index efd8e23b0c..b1ee56d859 100644
--- a/utils/json_pp.PL
+++ b/utils/json_pp.PL
@@ -28,7 +28,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
use File::Spec;
diff --git a/utils/libnetcfg.PL b/utils/libnetcfg.PL
index e1e9ee270f..fc8859539b 100644
--- a/utils/libnetcfg.PL
+++ b/utils/libnetcfg.PL
@@ -28,7 +28,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
# In the following, perl variables are not expanded during extraction.
diff --git a/utils/perlbug.PL b/utils/perlbug.PL
index f78b63c7dd..13afa7cb0f 100644
--- a/utils/perlbug.PL
+++ b/utils/perlbug.PL
@@ -47,7 +47,7 @@ my $extract_version = sprintf("%vd", $^V);
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
my \$config_tag1 = '$extract_version - $Config{cf_time}';
diff --git a/utils/perlivp.PL b/utils/perlivp.PL
index f175caadd9..597ed6f301 100644
--- a/utils/perlivp.PL
+++ b/utils/perlivp.PL
@@ -30,7 +30,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{'startperl'}
eval 'exec $Config{'perlpath'} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
print OUT "\n# perlivp $^V\n";
diff --git a/utils/piconv.PL b/utils/piconv.PL
index 4e012d3dc3..7be2196809 100644
--- a/utils/piconv.PL
+++ b/utils/piconv.PL
@@ -28,7 +28,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
use File::Spec;
diff --git a/utils/pl2pm.PL b/utils/pl2pm.PL
index 39a1fb9fec..9826c786a0 100644
--- a/utils/pl2pm.PL
+++ b/utils/pl2pm.PL
@@ -31,7 +31,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
# In the following, perl variables are not expanded during extraction.
diff --git a/utils/pod2html.PL b/utils/pod2html.PL
index eafd8f6665..1cc362fd8a 100644
--- a/utils/pod2html.PL
+++ b/utils/pod2html.PL
@@ -28,7 +28,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
use File::Spec;
diff --git a/utils/prove.PL b/utils/prove.PL
index 61b8efc8a5..4d59f3180c 100644
--- a/utils/prove.PL
+++ b/utils/prove.PL
@@ -28,7 +28,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
use File::Spec;
diff --git a/utils/ptar.PL b/utils/ptar.PL
index 5dbf61b312..383bd05d77 100644
--- a/utils/ptar.PL
+++ b/utils/ptar.PL
@@ -28,7 +28,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
use File::Spec;
diff --git a/utils/ptardiff.PL b/utils/ptardiff.PL
index 8daefe258a..a58f38a86e 100644
--- a/utils/ptardiff.PL
+++ b/utils/ptardiff.PL
@@ -28,7 +28,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
use File::Spec;
diff --git a/utils/ptargrep.PL b/utils/ptargrep.PL
index b8b0830dea..e37d5f0a4a 100644
--- a/utils/ptargrep.PL
+++ b/utils/ptargrep.PL
@@ -28,7 +28,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
use File::Spec;
diff --git a/utils/shasum.PL b/utils/shasum.PL
index afdbb48fe2..60f92dcd09 100644
--- a/utils/shasum.PL
+++ b/utils/shasum.PL
@@ -28,7 +28,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
use File::Spec;
diff --git a/utils/splain.PL b/utils/splain.PL
index f01ed126ec..28cf04b8e2 100644
--- a/utils/splain.PL
+++ b/utils/splain.PL
@@ -38,7 +38,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
print OUT <<'!NO!SUBS!';
diff --git a/utils/streamzip.PL b/utils/streamzip.PL
index 82887ac400..ca828e8f4c 100644
--- a/utils/streamzip.PL
+++ b/utils/streamzip.PL
@@ -28,7 +28,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
use File::Spec;
diff --git a/utils/xsubpp.PL b/utils/xsubpp.PL
index 450275ba10..2a04e62e3c 100644
--- a/utils/xsubpp.PL
+++ b/utils/xsubpp.PL
@@ -28,7 +28,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
use File::Spec;
diff --git a/utils/zipdetails.PL b/utils/zipdetails.PL
index 0fbdf83877..6232671566 100644
--- a/utils/zipdetails.PL
+++ b/utils/zipdetails.PL
@@ -28,7 +28,7 @@ print "Extracting $file (with variable substitutions)\n";
print OUT <<"!GROK!THIS!";
$Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
+ if 0; # ^ Run only under a shell
!GROK!THIS!
use File::Spec;