Jump to content


Photo

perl cpan modules


  • Please log in to reply
9 replies to this topic

#1 OFFLINE   korky

korky

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts
  • Local time: 06:48 AM

Posted 29 June 2011 - 09:53 PM

Was wondering if there is any way to compile perl cpan modules ? I tried the c/c++ dev tools to no avail ;(

Cheers

Korky

#2 OFFLINE   freamon

freamon

    Advanced Member

  • Members
  • PipPipPip
  • 471 posts
  • Local time: 06:48 AM
  • LocationHuddersfield, UK

Posted 30 June 2011 - 05:34 AM

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?

#3 OFFLINE   pmprog

pmprog

    www.pmprog.co.uk

  • Members
  • PipPipPip
  • 1595 posts
  • Local time: 07:48 AM
  • LocationCheshire, UK

Posted 05 July 2011 - 09:13 AM

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.
pmprog.pngpandora.pngbutton-small.pngtournamenthub.pnggithub.png

#4 OFFLINE   korky

korky

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts
  • Local time: 06:48 AM

Posted 07 July 2011 - 07:01 AM


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

#5 OFFLINE   pmprog

pmprog

    www.pmprog.co.uk

  • Members
  • PipPipPip
  • 1595 posts
  • Local time: 07:48 AM
  • LocationCheshire, UK

Posted 07 July 2011 - 08:59 AM

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?
pmprog.pngpandora.pngbutton-small.pngtournamenthub.pnggithub.png

#6 OFFLINE   freamon

freamon

    Advanced Member

  • Members
  • PipPipPip
  • 471 posts
  • Local time: 06:48 AM
  • LocationHuddersfield, UK

Posted 07 July 2011 - 09:59 AM

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.

#7 OFFLINE   korky

korky

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts
  • Local time: 06:48 AM

Posted 09 July 2011 - 07:33 AM

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!

#8 OFFLINE   Linux-SWAT

Linux-SWAT

    Advanced Member

  • Members
  • PipPipPip
  • 4899 posts
  • Local time: 07:48 AM
  • LocationParis, France

Posted 18 August 2011 - 07:54 PM

Anyway, how to use CPAN ?

#9 OFFLINE   kaprikawn

kaprikawn

    Advanced Member

  • Members
  • PipPipPip
  • 121 posts
  • Local time: 07:48 AM

Posted 06 November 2011 - 10:14 PM

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.

Edited by kaprikawn, 06 November 2011 - 10:52 PM.


#10 OFFLINE   Galaxis

Galaxis

    Advanced Member

  • Members
  • PipPipPip
  • 212 posts
  • Local time: 07:48 AM

Posted 07 November 2011 - 04:34 PM


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.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users