develooper Front page | perl.perl5.porters | Postings from November 2003

RE: Too late for "-M..."

Thread Previous
From:
Eric Amick
Date:
November 1, 2003 03:47
Subject:
RE: Too late for "-M..."
Message ID:
sc26qvc3si35f2g5t7ruo8eieg67dtobld@4ax.com
>Here is another sort-of-problem.
>
>$ >test.pl
>#!/usr/bin/perl -MCarp
>1;
>^D
>$ perl -MCarp -c test.pl
>Too late for "-MCarp" option at test.pl line 1.
>$
>

As perldiag says, -M and -m are not intended to be used in scripts, hence
the message.

>It's not a problem for something like -T, though:
>
>$ >test.pl
>#!/usr/bin/perl -T
>1;
>^D
>$ perl -T -c test.pl
>test.pl syntax OK
>$

That worked only because you put -T on the command line.  If you try it
with just -c, you'll get the same message, this time because turning on
taint checks within a script definitely is too late to do it.

-- 
Eric Amick
Columbia, MD


Thread Previous


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