Skip Menu |

This queue is for tickets about the Test-Harness CPAN distribution.

Report information
The Basics
Id: 43196
Status: rejected
Priority: 0/
Queue: Test-Harness

People
Owner: Nobody in particular
Requestors: EVDB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 3.14
Fixed in: (no value)



Subject: don't force '-w' on test scripts
I like to use 'Test::NoWarnings' so that I know my test scripts are running cleanly. Some 3rd party modules that I use are not as well behaved and produce copious warnings if run under 'perl -w'. These warnings are not present under 'prove -l ...' but are there under 'make test', causing the tests to pass or fail depending on how they are run. I'd like to be able to change the $Switches variable from a Makefile.PL so that I can run my tests without global warnings enabled. Indeed I'd argue that setting '-w' is a bug in itself as it causes an artificial test environment.
On Wed Feb 11 05:46:00 2009, EVDB wrote: Show quoted text
> I like to use 'Test::NoWarnings' so that I know my test scripts are > running cleanly. Some 3rd party modules that I use are not as well > behaved and produce copious warnings if run under 'perl -w'. > > These warnings are not present under 'prove -l ...' but are there under > 'make test', causing the tests to pass or fail depending on how they are > run. > > I'd like to be able to change the $Switches variable from a Makefile.PL > so that I can run my tests without global warnings enabled. Indeed I'd > argue that setting '-w' is a bug in itself as it causes an artificial > test environment.
That's something that the Test::Harness compatibility wrapper does for backwards compatibility. I'm reluctant to change legacy behaviour. Hopefully EUMM will switch to using TAP::Harness directly at some point of the future.
FWIW you can smooth over the difference by always putting -w or -X in your test's #! line to make it explicit. -w for warnings, -X for no warnings.