Then one solution would be to include Spec.pm with your distribution, and have your Makefile.PL install it as Cons::Spec (or whatever namespace
the CPAN registrars gave you) in the absence of a detected suitable File::Spec.
You can load the code in your modules like this:
BEGIN {
for (qw(Cons::Spec File::Spec)) {
eval "use $_"; last unless $@;
}
die "Cannot find Cons::Spec or File::Spec" if $@;
}
A little bit of runtime launch cost can provide a ton of flexibility for your installers.
If you want, you can even edit this at compile time into a simple use File::Spec, and avoid the runtime cost.
-- Randal L. Schwartz, Perl hacker | [reply] [d/l] |