diff options
author | Nicolas R <atoomic@cpan.org> | 2020-06-16 11:05:17 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-08-10 22:28:04 -0600 |
commit | 188e64dde7746219802c1eafb9ef48df31f65f0d (patch) | |
tree | 1ab704cd8389e5c5eb54967c07342b12f5cc140e /utils | |
parent | ab01742544b98b5b5e13d8e1a6e9df474b9e3005 (diff) | |
download | perl-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.PL | 2 | ||||
-rw-r--r-- | utils/cpan.PL | 2 | ||||
-rw-r--r-- | utils/enc2xs.PL | 2 | ||||
-rw-r--r-- | utils/encguess.PL | 2 | ||||
-rw-r--r-- | utils/h2ph.PL | 2 | ||||
-rw-r--r-- | utils/h2xs.PL | 2 | ||||
-rw-r--r-- | utils/instmodsh.PL | 2 | ||||
-rw-r--r-- | utils/json_pp.PL | 2 | ||||
-rw-r--r-- | utils/libnetcfg.PL | 2 | ||||
-rw-r--r-- | utils/perlbug.PL | 2 | ||||
-rw-r--r-- | utils/perlivp.PL | 2 | ||||
-rw-r--r-- | utils/piconv.PL | 2 | ||||
-rw-r--r-- | utils/pl2pm.PL | 2 | ||||
-rw-r--r-- | utils/pod2html.PL | 2 | ||||
-rw-r--r-- | utils/prove.PL | 2 | ||||
-rw-r--r-- | utils/ptar.PL | 2 | ||||
-rw-r--r-- | utils/ptardiff.PL | 2 | ||||
-rw-r--r-- | utils/ptargrep.PL | 2 | ||||
-rw-r--r-- | utils/shasum.PL | 2 | ||||
-rw-r--r-- | utils/splain.PL | 2 | ||||
-rw-r--r-- | utils/streamzip.PL | 2 | ||||
-rw-r--r-- | utils/xsubpp.PL | 2 | ||||
-rw-r--r-- | utils/zipdetails.PL | 2 |
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; |