From: Chip Salzenberg Date: Fri, 21 Feb 1997 14:41:53 +0000 (+1200) Subject: Document one-argument limitation with #! line X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3a52c276e0d3f7ff5170451cf71c31ef4fa2ef91;p=p5sagit%2Fp5-mst-13.2.git Document one-argument limitation with #! line (this is the same change as commit 3c5180aa4845c30d7891bc90e491cc6f9b6ecd85, but as applied) --- diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 394ffcb..3334b65 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -122,25 +122,25 @@ before it could possibly have been used. =item %s: Command not found (A) You've accidentally run your script through B instead -of Perl. Check the E#!E line, or manually feed your script -into Perl yourself. +of Perl. Check the #! line, or manually feed your script into +Perl yourself. =item %s: Expression syntax (A) You've accidentally run your script through B instead -of Perl. Check the E#!E line, or manually feed your script -into Perl yourself. +of Perl. Check the #! line, or manually feed your script into +Perl yourself. =item %s: Undefined variable (A) You've accidentally run your script through B instead -of Perl. Check the E#!E line, or manually feed your script -into Perl yourself. +of Perl. Check the #! line, or manually feed your script into +Perl yourself. =item %s: not found (A) You've accidentally run your script through the Bourne shell -instead of Perl. Check the E#!E line, or manually feed your script +instead of Perl. Check the #! line, or manually feed your script into Perl yourself. =item B<-P> not allowed for setuid/setgid script @@ -193,7 +193,9 @@ a missing quote, operator, parenthesis pair or declaration. =item Args must match #! line (F) The setuid emulator requires that the arguments Perl was invoked -with match the arguments specified on the #! line. +with match the arguments specified on the #! line. Since some systems +impose a one-argument limit on the #! line, try combining switches; +for example, turn C<-w -U> into C<-wU>. =item Argument "%s" isn't numeric%s @@ -320,8 +322,8 @@ wasn't a symbol table entry. =item Badly placed ()'s (A) You've accidentally run your script through B instead -of Perl. Check the E#!E line, or manually feed your script -into Perl yourself. +of Perl. Check the #! line, or manually feed your script into +Perl yourself. =item BEGIN failed--compilation aborted @@ -2125,7 +2127,7 @@ if the error went away. Sort of the cybernetic version of S<20 questions>. =item syntax error at line %d: `%s' unexpected (A) You've accidentally run your script through the Bourne shell -instead of Perl. Check the E#!E line, or manually feed your script +instead of Perl. Check the #! line, or manually feed your script into Perl yourself. =item System V IPC is not implemented on this machine @@ -2200,9 +2202,9 @@ handles tainting, by the time Perl discovers a B<-T> in a script, it's too late to properly taint everything from the environment. So Perl gives up. -This error can usually be fixed by editing the "#!" line so that the +This error can usually be fixed by editing the #! line so that the B<-T> option is in the Perl program's first argument. (Many operating -systems that implement the "#!" feature only pick up one argument from +systems that implement the #! feature only pick up one argument from it, so Perl has to get the rest on its own.) =item Too many ('s @@ -2210,8 +2212,8 @@ it, so Perl has to get the rest on its own.) =item Too many )'s (A) You've accidentally run your script through B instead -of Perl. Check the E#!E line, or manually feed your script -into Perl yourself. +of Perl. Check the #! line, or manually feed your script into +Perl yourself. =item Too many args to syscall @@ -2523,8 +2525,8 @@ variables. =item Variable syntax (A) You've accidentally run your script through B instead -of Perl. Check the E#!E line, or manually feed your script -into Perl yourself. +of Perl. Check the #! line, or manually feed your script into +Perl yourself. =item Warning: something's wrong diff --git a/pod/perlsec.pod b/pod/perlsec.pod index 5961200..3e44e5b 100644 --- a/pod/perlsec.pod +++ b/pod/perlsec.pod @@ -141,6 +141,17 @@ locale-aware program, and want to launder data with a regular expression containing C<\w>, put C ahead of the expression in the same block. See L for further discussion and examples. +=head2 Switches On the "#!" Line + +When you make a script executable, in order to make it usable as a +command, the system will pass switches to perl from the script's #! +line. Perl checks that any command-line switches given to a setuid +(or setgid) script actually match the ones set on the #! line. Some +UNIX and UNIX-like environments impose a one-switch limit on the #! +line, so you may need to use something like C<-wU> instead of C<-w -U> +under such systems. (This issue should arise only in UNIX or +UNIX-like environments that support #! and setuid or setgid scripts.) + =head2 Cleaning Up Your Path For "Insecure C<$ENV{PATH}>" messages, you need to set C<$ENV{'PATH'}> to a