On Sat, Feb 12, 2005 at 12:10:26PM -0500, Stas Bekman wrote:
> >Given that A::T is calling the undocumented method lib->import directly,
> 
> why undocumented?

In the sense that it isn't mentioned in the POD.


> the only difference is that we don't have the BEGIN block. So it happens 
> at run time and not compile time.

I see. Neat trick.


> It's not the same because lib::import does more than that (removing dups, 
> inserting arch-specific dirs, etc.). Though in this particular case one 
> could argue that your solution above is almost an equivalent.

OK.


> I'd still suggest to first write a simple standalone case that 
> demonstrates the problem and see if p5p has anything insightful to say 
> about it. We can work out the test case here.

That's what I was playing with this morning when I realized the fix
doesn't really cure the bug I'm seeing.


> For example this:
> 
>   perl -wle 'use lib "/tmp"; use UNIVERSAL qw(isa); \
>        lib->import("/tmp/foo"); print join "\n", @INC'
> 
> seems to work just fine. Can you break it?

Yes, drop the use lib which is more in line which how A::TestConfig is
written (it nevers calls use lib). Apparently, calling 'use lib' fixes
the import function and has nothing to do with the order it's called in
as I had surmised in an earlier email.


William

-- 
Knowmad Services Inc.
http://www.knowmad.com

Reply via email to