On 9/25/05, Randy W. Sims <[EMAIL PROTECTED]> wrote:
> D'oh. I shoulda taut a dat. I tried defining sub Module::import {die}
> which works for C<use>, but not C<require>. I thought of pushing coderef
> on @INC, but it don't work for older perls. Ivan's suggestion of
> Devel::Hide, while doing exactly what I want, unfortunately requires
> perl > 5.8.

The release 0.00_02 of Devel::Hide in CPAN lifted the requirement for
perl > 5.8 and now works with perl > 5.6.1. The involved issues were
not essential: in 5.8, it was easier to use an in-core file (and
that's the code I wrote for the first release), and now in 5.6.1, a
temp file is used. The module works by adding a hook in @INC which
includes on-the-fly a filehandle which "require" wil use (but the only
code is

        die "Can't locate Module/ToHide.pm (hidden)"

It is equivalent to creating empty files (like Mike Graham suggested),
only with better diagnostics. It still does not solve the problem with
specific versions (which does not seem to be a problem for your
immediate use case).

Well, but from the point of supporting for < 5.6.1, it does not help
at all. Code refs in @INC will not work.

Regards,
Adriano.

Reply via email to