summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2009-07-26 10:27:42 +0100
committerNicholas Clark <nick@ccl4.org>2009-07-26 10:27:42 +0100
commit4ba71d51f72efb2af8dc9748dd62219261f2e1fd (patch)
treedb33beb1f04b46d1f8f8202b570e72464a23aacd /pod
parentf0c5aa00eeb992584d6996af147c4c51fe7a6540 (diff)
downloadperl-4ba71d51f72efb2af8dc9748dd62219261f2e1fd.tar.gz
Allow -C on the #! line when it is identical to -C on the command line.
Change from dieing whenever -C is seen on the #! line, to dieing only when it differs from that on the command line, or was not specified on the command line.
Diffstat (limited to 'pod')
-rw-r--r--pod/perldiag.pod11
-rw-r--r--pod/perlrun.pod6
2 files changed, 12 insertions, 5 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 1775163cf7..2623010499 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -4196,8 +4196,15 @@ system call to call, silly dilly.
=item Too late for "-%s" option
(X) The #! line (or local equivalent) in a Perl script contains the
-B<-M>, B<-m> or B<-C> option. This is an error because those options
-are not intended for use inside scripts. Use the C<use> pragma instead.
+B<-M>, B<-m> or B<-C> option.
+
+In the case of B<-M> and B<-m>, this is an error because those options are
+not intended for use inside scripts. Use the C<use> pragma instead.
+
+The B<-C> option only works if it is specified on the command line as well
+(with the same sequence of letters or numbers following). Either specify
+this option on the command line, or, if your system supports it, make your
+script executable and run it directly instead of passing it to perl.
=item Too late to run %s block
diff --git a/pod/perlrun.pod b/pod/perlrun.pod
index c3b30c8ad7..994aecb847 100644
--- a/pod/perlrun.pod
+++ b/pod/perlrun.pod
@@ -342,10 +342,10 @@ that enabled the use of Unicode-aware "wide system call" Win32 APIs.
This feature was practically unused, however, and the command line
switch was therefore "recycled".)
-B<Note:> Since perl 5.10.0, the -C option can no longer be used
-on the #! line. It wasn't working there anyway, since the standard streams
+B<Note:> Since perl 5.10.1, if the -C option is used on the #! line, it
+must be specified on the command line as well, 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.
+You can also use binmode() to set the encoding of an I/O stream.
=item B<-c>
X<-c>