I have a package that requires non-perl things installed. My test suite checks for that.
However.. it feels like the wrong place.
All I can do is throw an exception and exit if something is missing, or notify and continue.

It seems the tests should only test the package.. not if your setup meets requirements.
Thus, it seems Makefile.PL should have this.
What is a hack to get the makefile to check for system requirements? For example to make sure that the system is POSIX compliant, or that you have slocate, or that you have sendmail installed and running (just kidding).

There must be a way the Makefile.PL can be appended to somewhere to stop if something is off. Thus, system requirement errors stay as such, and the test suite can stay the test suite.

Perhaps it would be best to simply throw exceptions on the tests, which is I imagine why we have a 99%. fail rate on things like Image::Magick

# pseudo Makefile.PL use ExtUtils::MakeMaker; WriteMakefile( NAME => 'Baby::Sitter', VERSION_FROM => 'lib/Baby/Sitter.pm', PREREQ_PM => { Cwd => 0 }, PREREQ_SYS => { bin => [qw(baby find cat convert)], # ????? POSIX => 1, }, );

I guess the Makefile.PL can only really just die out with a warning or install cpan modules?

Maybe a distro of this sort really should simply be offered as source, an rpm, etc?

I'd appreciate any thoughts/comments


In reply to Testing for non-perl system requirements by leocharre

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.