Re: TAP - Test::More - fork
Michael G Schwern <[email protected]>
| Newsgroups | gmane.comp.lang.perl.quality-assurance |
|---|---|
| Message-ID | <[email protected]> |
On 2011.11.10 4:59 PM, Buddy Burden wrote:
> chromatic/Merjin,
>
>>> Not "use warnings" but the -w command line flag -- the non-lexical, warnings-
>>> on-everywhere one.
>
>> no change whatsoever. I've now added -w to all #! lines in the t files
>
> 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.
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), `make
test` (sets -w), and running it as a normal Perl program (does not set -w).
If you don't want global warnings, explicitly turn them off with BEGIN { $^W =
0 }.