Grokbase
Topics Posts Groups | in
x
[ help ]

Re: Too late for -Co

View PostFlat  Thread  Threaded | < Prev - Next >
Nicholas Clark Re: Too late for -Co
| +1 vote
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Tue, Mar 25, 2008 at 09:33:28PM +0000, Alberto Simes wrote:
> Hi, Folks.
>
> I had some CGI scripts using
> #!perl -CoO
>
> Now, with perl 5.10.0 I can't do that.
>
> What is the preferred solution?

IIRC it didn't ever actually work on 5.8.x. (If so) if you take it out, does
anything change?

(What might be more accurate is that it doesn't work at the time of the perl
interpreter's #! line processing, but if the invoking program is the shell, and
processes that first line itself, to add options to the C argv passed to the
perl interpreter, then *that* would be setting them.

Someone else correct me if I'm wrong, but as I understand it, if you start
your script ./rakkk

#!/usr/bin/perl -w

then often perl is invoked by the shell as

/usr/bin/perl -w ./rakkk

and that -w is set and processed before the script is opened. But then perl
reads in the first line of the script, and processes the -w again (using
Perl_moreswitches()). But for all the command line options that can be used on
the #! line, it doesn't matter if they are processed multiple times)

Nicholas Clark

Thread : Too late for -Co
1)
Alberto Simões Hi, Folks. I had some CGI scripts using #!perl -CoO Now, with perl 5.10.0 I can't do that. What is...
2)
Nicholas Clark IIRC it didn't ever actually work on 5.8.x. (If so) if you take it out, does anything change?...
3)
Alberto Simões It worked with 5.8.8 ...
4)
A. Pagaltzis Hi Nicholas, no, it’s the kernel that does that, automatically. The shell has nothing to do with...
5)
Alberto Simões using binmode STDOUT, ":utf8" Thanks > ambs...
6)
A. Pagaltzis use open OUT => ':utf8', ':std'; Regards,
spacer
View PostFlat  Thread  Threaded | < Prev - Next >
Home > Groups > Perl 5 Porters > Too late for -Co (6 posts) > View Post