[Za-pm] Re: Za-pm digest, Vol 1 #21 - perl modules

Dr Giancarlo Contrafatto contrafa at biology.und.ac.za
Tue Jun 3 07:06:05 CDT 2003


On Tue, 2003-06-03 at 10:26, Nick Cleaton wrote:
> > 
> > I guess, it is best if I retreive the code I was using for testing (and
> > the messages), from my home machine, and post them here tomorrow
> > morning.
> 
> Yes please.  Also, if you're getting messages along the lines of:
> 
>   Can't locate Foo.pm in @INC (@INC contains: /usr/local/lib/perl/ .....
> 
> then it'd help if you could track down the missing Foo.pm (or whatever
> it is in your case) by running a shell command like:
> 
>   locate '*/Foo.pm'

Yep, done that and downloaded the offending modules. This fixed a few
errors but not all. By the look of the first compiler message below, I
must now go and hunt for more modules.

In this first example, I'm just testing the Tk.pm with the simple "Hello
World" script that comes with the pod. The code, which I forgot to send
to my office machine, starts off as it should (I think):

#! /usr/perl -w

use Tk;
use strict;
... and then the code to write "Hello World", which is not crucial to
have right now.

The message is as follows:

Can't locate loadable object for module Event in @INC (@INC contains:
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at
/usr/lib/perl5/5.8.0/Tk/Event.pm line 23
Compilation failed in require at /usr/lib/perl5/5.8.0/Tk.pm line 13.
BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/Tk.pm line 13.
Compilation failed in require at hello line 2.
BEGIN failed--compilation aborted at hello line 2.
Can't locate Event/all_watchers.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
..... same list here ......
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at
/usr/lib/perl5/5.8.0/Tk/Event.pm line 50.
        ...propagated at /usr/lib/perl5/5.8.0/Tk/Event.pm line 51.
END failed--call queue aborted at hello line 2.

Now, Events.pm is one of the modules I was missing (the preceding error
message pointed to it), so I downloaded it and "just placed" it in the
path. In restrospect, this may have been a dumb way of doing it because,
by the look of it, there are plenty dependencies to be taken care of.
The way I see it (check my reasoning here), the whole sequence fails
straight away (line 2 of the hello script) where Tk is used. It fails
because Tk depends on Events.pm which, in turn, depends on
all_watchers.pm but also needs some unspecified "loadable object" which
I haven't been able to identify by checking around line 23 of Events.pm.
So, maybe I should have "made" Tk when I downloaded it but, it came
without makefile and the pod didn't mention anything about
installations.

The other module I'm busy testing is Imager.pm and it does pretty much
the same thing as Tk though, in this case, the offending dependency
happens in DynaLoader:

Can't locate loadable object for module Imager in @INC (@INC contains:
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
..... same list here ......
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at
/usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 153
BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/Imager.pm line
153.
Compilation failed in require at thumb_01 line 6.
BEGIN failed--compilation aborted at thumb_01 line 6.

And that's all I can say for the time being.

Thanks

ciao


-- 
we should distrust any enterprise that requires new clothes. Henry David
Thoreau
                   \|/
                  (o o)
--------------ooO0-(_)-0Ooo----------------------------------------------
G. Contrafatto - School of Life and Environmental Science
University of Natal Durban - Ph. +270312603336
##########################################################################
Visit Darwin at http://contra.biology.und.ac.za




More information about the Za-pm mailing list