perl cpan modules


korky

Still Fresh
Joined
Dec 7, 2006
Messages
76
Was wondering if there is any way to compile perl cpan modules ? I tried the c/c++ dev tools to no avail ;(


Cheers


Korky
 
Perl modules don't normally need to be compiled do they? I thought you just included them. Can you elaborate on what you're trying to do?
 
Perl modules don't normally need to be compiled do they?

No. Perl is a completely seperate language from C/C++, and is 100% script based.
Indeed it is, but in order to use some perl modules they require compiling with C. i.e. download net::ping from cpan.org and read the readme. You have to run the makefile.pl, which creates a c makefile, which you then have to run make, then make test and finally make install. Anyhow this procedure fails on the pandy ;(


Cheers


Korky
 
in order to use some perl modules they require compiling with C.

Suppose that makes sense, I don't remember ever doing that when I used to use Perl though.


Have you tried running make from freamon's C/C++ dev tools PND? What information does it give you back?
 
I downloaded Net::ping and tried it - I got the error about 'No Target to make /usr/lib/perl/5.8/CORE/config.h' - is that the error you got? It's because perl-dev isn't installed on the OS and I haven't included it in the cdevtools pnd. I can probably fix this for the next release, but I'm not convinced you really need it. Here's the thing:


1) You already have Net::ping on your pandora (in /usr/share/perl/5.8/Net/Ping.pm)


2) There's no C files in the Net::ping download.


3) Running 'perl Makefile.pl' creates a Makefile, but it's not a C Makefile. They're just using it as a way of copying files. If you got it to work, all 'make install' would do is copy lib/Net/Ping.pm as /usr/share/perl/5.8/Net/Ping.pm (which is already there) and copy some man documentation (which you wouldn't be able to display). You can replicate its behavior by just copying the files yourself.
 
I downloaded Net::ping and tried it - I got the error about 'No Target to make /usr/lib/perl/5.8/CORE/config.h' - is that the error you got? It's because perl-dev isn't installed on the OS and I haven't included it in the cdevtools pnd. I can probably fix this for the next release, but I'm not convinced you really need it. Here's the thing:


1) You already have Net::ping on your pandora (in /usr/share/perl/5.8/Net/Ping.pm)


2) There's no C files in the Net::ping download.


3) Running 'perl Makefile.pl' creates a Makefile, but it's not a C Makefile. They're just using it as a way of copying files. If you got it to work, all 'make install' would do is copy lib/Net/Ping.pm as /usr/share/perl/5.8/Net/Ping.pm (which is already there) and copy some man documentation (which you wouldn't be able to display). You can replicate its behavior by just copying the files yourself.

Many thanks, will give it a bash, although the missing core modules might come back to haunt me!
 
I'll apologise in advance if this doesn't work but I don't think I'm going to be able to test this before I go to bed! But CPAN works on the Pandora Debian install (I'm using the full Debian install on the SD card, NOT PanDebian). It looks like the Perl install is much more mature/is working. Is it possible to install a module from Debian to a non-standard location as in this tutorial:


http://world.std.com...cs.html#TOC24.5


You might be able to install to an SD card from within Debian, then switch back to Angstrom and link to the module on the SD card as required. That's what I'm trying, I'll report back if it works.


EDIT:


Didn't work by compiling the module from source, though I don't know whether it's just a difficult module I'm trying, or whether it's a fundamental issue with my methodology. Trying to install it with CPAN now and then seeing if I can copy over the .pm file.


EDIT2:


Isn't working, CPAN seems to be falling over at the 'make' stage on every module I try to install, this is going to take some troubleshooting.
 
Last edited by a moderator:
Perl modules don't normally need to be compiled do they?
No. Perl is a completely seperate language from C/C++, and is 100% script based.
That's actually wrong as far as perl modules are concerned. Lots of them are written in C and require a compiler to build the module code. You can just call their functions from the Perl interpreter later on.
 
Back
Top