leocharre has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|