On Thu, Feb 10, 2005 at 06:32:30PM -0500, Stas Bekman wrote:
> That most likely means that someone redefines sub lib::import. Could be 
> Time::Piece or something else used by that module. It's their fault, not 
> A-T's one. You could easily verify that by adding something like:

I love hanging out with you guys; always something new to learn. Thanks
for the hints. Unfortunately the $SIG{__DIE__} trick didn't work.
Perhaps that's due to the fact that this bug lies within the UNIVERSAL
module. Basically, Time::Piece has the following line which is causing
the problems:

  use UNIVERSAL qw(isa);

>From what I read about UNIVERSAL in its source, it causes the import
method to be redefined. I was able to create a script that reproduces
the error. The error happens under Linux as well. This begs the question
as to why A::T works without error on Linux but not on Windows.

Further testing has shown that order is important. If I place a 'use
lib' line *after* the use UNIVERSAL (or any other module which uses
UNIVERSAL), all is well. However, I still don't get the reason why these
tests would fail under Windows but work under Linux. There must be
something different about my Perl environment between the two.

Now, since we know that using the UNIVERSAL module is not uncommon,
should A::T take measures to defend against lib->import getting
redefined? Adding a 'use lib;' line just before the call to
lib->import($top_dir) works for me under WinXP and does not generate
redefine warnings.


Cheers,
William

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

Reply via email to