in reply to Skip Vs. Fail

I think that tests should only be skipped if they have certain unmet dependencies that are not strictly required for the code itself. In my experience this is usually due to missing optional libraries and/or modules.

My feeling is that the installer should notify the user of the missing dependencies and give them a chance to bail out / install the dependencies instead of just skipping the tests. You should probably use ExtUtils::MakeMaker's prompt() function for this.

Example snippet from a Makefile.PL:

my $play_audio = 1; if (! eval { require Audio::Play; } ) { $play_audio = prompt( "No Audio::Play module was found on your system. Without it, we can't do audio output. If you want to test audio output, answer yes to the following question. Audio::Play will then be added to the required module list. This means it will be installed automatically if you're using the CPAN / CPANPLUS modules. Do you want to test audio output (requires Audio::Play)? y/n","n") =~ +/^y/i; } WriteMakefile( 'NAME' => 'Audio::LADSPA', 'VERSION_FROM' => 'LADSPA.pm', # finds $VERSION 'PREREQ_PM' => { 'Test::More' => 0, ( $play_audio ? ('Audio::Play' => 1.000, 'Audio::Data' => 1.000) : + ()), 'Graph' => 0.5, # NEW interface for graph 'Scalar::Util' => 0, 'Data::Uniqid' => 0, }, # e.g., Module::Name => 1.i ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (AUTHOR => 'Joost Diepenmaat <jdiepen AT cpan.org>') : ()), 'EXE_FILES' => ['eg/pluginfo'], 'OPTIMIZE' => '-O', )

The reason for this particular skip is that Audio::Play seems to have some issues installing on certain systems, and it's not strictly nessecary for the module in question. The test/*.t files will skip if Audio::Play can't be loaded.