Closed p5pRT closed 15 years ago
This is a bug report for perl from simon.perreault@viagenie.ca\, generated with the help of perlbug 1.36 running under perl 5.10.0.
----------------------------------------------------------------- Do the following to reproduce:
$ cat >test.pl #!/usr/bin/perl -CS print "hello world\n"; $ chmod +x test.pl $ ./test.pl Too late for "-CS" option at ./test.pl line 1. $
quoting from perl5100delta ( http://perldoc.perl.org/perl5100delta.html#Miscellaneous ):
The -C option can no longer be used on the #! line. It wasn't working there anyway\, since the standard streams are already set up at this point in the execution of the perl interpreter. You can use binmode() instead to get the desired behaviour.
module@renee-baecker.de - Status changed from 'new' to 'resolved'
Hi\,
attached is a small documentation patch that adds a hint that -C can no longer be used in the shebang to perlrun.
Cheers\, Renee
* \simon\.perreault@​viagenie\.ca [2008-10-07 10:50]:
$ cat >test.pl #!/usr/bin/perl -CS print "hello world\n"; $ chmod +x test.pl $ ./test.pl Too late for "-CS" option at ./test.pl line 1. $
This is not a bug in perl\, itâs a bug in your shebang line. The fact that this used to work was a bug in perl that has since been fixed. The correct incantation for what you want to achieve is
use open qw( :std :encoding(UTF-8) );
Regards\, -- Aristotle Pagaltzis // \<http://plasmasturm.org/>
On Tue\, Oct 07\, 2008 at 02:57:20PM +0200\, Aristotle Pagaltzis wrote:
* \simon\.perreault@​viagenie\.ca [2008-10-07 10:50]:
$ cat >test.pl #!/usr/bin/perl -CS print "hello world\n"; $ chmod +x test.pl $ ./test.pl Too late for "-CS" option at ./test.pl line 1. $
This is not a bug in perl\, it???s a bug in your shebang line. The fact that this used to work was a bug in perl that has since been fixed. The correct incantation for what you want to achieve is
use open qw\( :std :encoding\(UTF\-8\) \);
It's not a bug in that it's behaving as documented. But\, arguably it is a bug\, because it could be made to work in future. There hasn't been the conjunction of people with desire\, ability and time.
I have some idea how it might be made to work\, if someone else with time wants to learn enough to get it done.
Nicholas Clark
2008/10/7 RenĂ©e BĂ€cker \renee\.baecker@​smart\-websolutions\.de:
Hi\,
attached is a small documentation patch that adds a hint that -C can no longer be used in the shebang to perlrun.
Thanks\, applied.
Migrated from rt.perl.org#59652 (status was 'resolved')
Searchable as RT59652$