[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-Porters] possible bug on #! line, PERL5OPTS



On Tue, 2 Mar 1999, Chris Nandor wrote:

> I cannot put anything after an -MSome::Module on the #! line or in
> $ENV{PERL5OPTS}.
> 
> Works:
> 
>   #!perl -w -MData::Dumper
>   print Dumper {%ENV}
> 
> Doesn't:
> 
>   #!perl -MData::Dumper -w
>   print Dumper {%ENV}
> 
> This should work, and does work under Unix.  The greatest problem is when I
> want to put multiple -M flags in PERL5OPTS.

Hi, Chris

I started digging into the source files to figure this one out, just so
you know. For your example above, on my machine, it looks like MacPerl
treats -w as the first line of code.

Could be some pretty subtle script bugs come out of this if the switch
that you stuck in on the shebang line, after -M, was also a filetest
operator. :-) Especially if the first line after the shebang was a ;#
comment (you remember when some people were proselytizing ;# comment lines
as opposed to just # comment lines? Goes a ways back.) Just some twisted
musings on my part... :-)

Arved





==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-porters-request@macperl.org