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.


In reply to Re: Skip Vs. Fail by Joost
in thread Skip Vs. Fail by pileofrogs

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.