On Wed, May 06, 2009 at 08:44:00AM -0700, Jonathan Swartz wrote:
> From: Michael Peters <mpet...@plusthree.com>
> > Jonathan Swartz wrote:
> > > In the latest version I deleted a necessary module, CHI/t/Multilevel.pm, 
> > > from the distribution, but "make test" still succeeded because 
> > > CHI/t/Multilevel.pm was installed in /usr/local.
> > You could also put your testing libs in t/lib instead of CHI/t that
> > way they are never installed.
> That's true, but this isn't just about testing libs - it's any lib I
> might delete from the distribution.

You want Devel::Hide.

  use Devel::Hide qw(Module::To::Hide Another::Module ...);
  use lib qw(blib/lib blib/arch);

and after that, if you try to use one of the "hidden" modules, then they
will only load if they're in the two extra directories.  That's because
they'll come before Devel::Hide's magic in the @INC search path.

That's basically a lucky side-effect of how it works, and is documented
under "caveats", but I don't imagine it'll change, as to fix that would
require (even more) Dark Magic.  Probably tieing @INC, if that's
possible.

-- 
David Cantrell | Minister for Arbitrary Justice

EIN KIRCHE! EIN KREDO! EIN PAPST!

Reply via email to