On Saturday 30 August 2008 05:01:11 David Golden wrote: > You can write "die" on missing prerequisites if you want, as long as > you realize that CPAN Testers can't tell that from an error condition > that you (or others) might actually care about.
Why die on missing prereqs? I use a META.yml because someone said that it's easier to determine prereqs without running my Build.PL. If the tester client ignores that, what good is it? > That said, there are ways to make this a bit "easier" at the cost of > packing up modules in inc. See Devel::CheckOS and Devel::CheckLib. > Someone could go write Devel::CheckBinary or whatever. > > What would avoid all this hassle is to have a well-defined way for > people to specify their non-perl dependencies in META.yml, and then > have M::B and EU::MM check those in a consistent way. Of course, that > only works if newer versions of M::B and EU::MM are installed, so you > also then need "configure_requires" in META.yml. But that only works > if a recent enough version of CPAN or CPANPLUS is installed to know to > check configure_requires... and we're back to the maze of twisty > passages. > > Or just "exit 0" and be done with it. That brings up an old memory. You may have seen this from h2xs. ######## We start with some black magic to print on failure. # Change 1..1 below to 1..last_test_to_print . # (It may become useful if the test is moved to ./t subdirectory.) BEGIN { $| = 1; print "1..1\n"; } END {print "not ok 1\n" unless $loaded;} use Foo; $loaded = 1; print "ok 1\n"; ######## End of black magic. We killed that black magic off years ago. Why can't we kill off this black magic? Maybe we need this counter-cantrip for a while: BEGIN { eval "use CPAN 1.9205"; eval "use CPANPLUS 0.84" if $@; die "UPGRADEPLZ: your CPAN and/or CPANPLUS are ancient, " . "please join us in the 20th century\n"; } Not entirely sure he wants to play CPAN Corewars, -- c