On Mon, Nov 25, 2002 at 02:33:45PM +0100, Rafael Garcia-Suarez wrote:
> Chris Nandor <[EMAIL PROTECTED]> wrote:
> > 
> > That shouldn't work.  By the time you get to it in the script, if you have a 
> > #! line, then the entire script is one long comment, and the use() line 
> > won't ever be executed.
> 
> That would be an argument for allowing -M/-m on the #! line.

Er, except that the #! line would all have been read by then, and treated
as a comment. Or have I got things confused?

.... (that's 3 dots, perl.org smtp daemon)

the kernel parses the -M line and invokes perl with those -M options.
then perl runs and reaches the -M line again, and now we just need it not
to complain like it currently does.

I hoped it would be possible to hack round it in some way, relying on
\r being whitespace, so that

#!/usr/local/bin/perl -w
-MFilter if 0;

would behave as a no-op on a system with matching \n, and as 

#!/usr/local/bin/perl -w -MFilter if 0;

on a system where \n and \r are transposed, but I can't make it work.

Nicholas Clark

PS I need to dig it out of the archives for a second time, but nothing came
   of my #! line \r\n protector that works on everything it was tested on
   (Linux, FreeBSD, Solaris - so hopefully all SysV, BSD* and Linux)

Reply via email to