DateTime and Thread::Running conflict

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
how do i trouble-shoot this?  conceptually, how can one module
(Thread::Running) hammer Perl's ability to poke through the file

guru> cat test
use DateTime;
use Thread::Running;
my $dt = DateTime->now( time_zone => 'local' );
Could not find file for 'DateTime::TimeZone::Local::Unix' at /usr/lib/
perl5/site_perl/5.8.8/ line 256.

u> cat test
use DateTime;
#use Thread::Running;
$dt = DateTime->now( time_zone => 'local' );
guru> ./test

guru> pwd
guru> l
-r--r--r-- 1 skendric users 7239 Nov  7 20:32


stuart kendrick

Re: DateTime and Thread::Running conflict wrote:
Quoted text here. Click to load it

It looks to me like the problem is that Thread::Running invokes "use load",
which causes module loading to be delayed until a function from that module
is actually used.  Part of this delay is (apparently) that %INC doesn't get
updated when the "use" is compiled.

While the DateTime module expects to load all of it's modules up front, and
based on that it inspects %INC to see if a module has already been loaded.
Or something like that.

These two behaviors are incompatible.  I don't know why either module does
either of these rather weird (to me) things.  I could be wrong in the
details of the above, it is just my first impression.

Quoted text here. Click to load it

To reproduce your problem, it is sufficient to have "use load;" rather
than "use Thread::Running".

Sorry, I don't have a solution, but I hope I've helped narrow down where
to look.


-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.

Site Timeline