Re: TAP - Test::More - fork

Buddy Burden <[email protected]>
Newsgroups gmane.comp.lang.perl.quality-assurance
Message-ID <CAL0mxoQxWq9-o0RRGp55E4_25jpYbJ5O8RF7hJPUnNk7a3rgfQ@mail.gmail.com>
Schwern,

On Thu, Nov 10, 2011 at 5:57 PM, Michael G Schwern <[email protected]> wrote:
> On 2011.11.10 4:59 PM, Buddy Burden wrote:
>> Does that do anything?  I didn't think prove respected the shebang
>> line.  Anyway, I thought the -w to prove would be effectively doing
>> that all along.
>
> Perl respects the *options* on the #! line, prove only adds to them.

I did not know this ... just to be super-clear, obviously I know that
if I have script.pl and it starts with

    #! /usr/bin/perl -w

and I make it executable and run it directly, I get perl -w.  But
you're saying that even if I type:

    perl script.pl

I _still_ get perl -w?  That, I was not aware of.

> Adding -w to the #! line on your tests is a very good idea to avoid the
> gotcha of differences between a test being run with `prove` (does not set
> -w), ...

Well, yes, prove doesn't _normally_ set -w, but if you run prove -w,
it does, doesn't it?


            -- Buddy
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.