Rick Measham schreef:
> I just got a fail from CPAN testers and it made me think. How do I solve
> this problem:
>
> DateTime::Event::Easter doesn't use DateTime::Calendar::Julian unless you
> ask for Eastern (Orthodox) Easter. However one of the test suites requires
> it to test Eastern known Easters (t/07eastknown.t).
I had the same problem with DateTime::Calendar::Pataphysical. It uses
DateTime.pm to test conversion to Gregorian dates, but the module itself
does not depend on DateTime, only on DateTime::Language and ::Duration.
> Should I:
> 2) Skip the tests if its not installed (if so, what's the proper format?)
This is the best option, I'd say. Put
SKIP:{
eval {require DateTime::Calendar::Julian};
skip 'DateTime::Calendar::Julian not installed', $n if $@;
# Put your tests here
}
around your tests, where $n is the number of tests skipped. (I think
this works, but I'm not 100% sure. I haven't tested DT::C::P without
DateTime installed.)
Eugene