develooper Front page | perl.perl5.porters | Postings from December 2011

[perl #104288] Unrecognised switches on the #! line aren't reported as such

From:
James E Keenan via RT
Date:
December 6, 2011 03:39
Subject:
[perl #104288] Unrecognised switches on the #! line aren't reported as such
Message ID:
rt-3.6.HEAD-5084-1323171582-103.104288-15-0@perl.org
On Tue Nov 22 06:13:16 2011, nicholas wrote:

> 
> Unrecognised command line switches are reported as such on the command
> line.
> If found on a #! line, they're reported as "Can't emulate".
> 
> This seems wrong.
> 
> $ echo '#!perl -R' | ~/Sandpit/5000/bin/perl
> Can't emulate -R on #! line at - line 1.
> $ echo '#!perl -R' | ~/Sandpit/5000/bin/perl -R
> Unrecognized switch: -R.
> 
> [still present in blead]
> 

For reference, here are the locations in source (blead):

./perl.c:1953:      Perl_croak(aTHX_ "Unrecognized switch: -%s  (-h will
show valid options)",s);
./perl.c:3467:  Perl_croak(aTHX_ "Can't emulate -%.1s on #! line",s);
...
./pod/perldiag.pod:713:=item Can't emulate -%s on #! line
./pod/perldiag.pod:4944:=item Unrecognized switch: -%s  (-h will show
valid options)




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About