[OPEN-ILS-DEV] another newbie q, Perl modules

Dan Scott denials at gmail.com
Mon Apr 16 16:51:36 EDT 2007


Hi Natasha:

On 16/04/07, Natasha Stephan <stephann at lindahall.org> wrote:
>
> Hi again,
>
> I have several other related questions, this time regarding Perl modules.
>
> Background:  I am on FC6.  I have gotten through most of the prerequisites
> listed on the DocuWiki, with the exception of the "bundle of Perl modules"
> mentioned here:
>
> http://open-ils.org/dokuwiki/doku.php?id=prerequisites
>
> Q1:  The page that is linked,
> http://open-ils.org/dokuwiki/doku.php?id=perl_modules,
> mentions CPAN and retrieving Perl modules individually.  The page that
> specifically refers to my OS,
> http://open-ils.org/dokuwiki/doku.php?id=installing_prerequisites_on_red_hat_fedora,
> mentions:
>
> DAG's (popular perl modules for RHEL/FC)
>
> Neither links to an actual "bundle", so I can only assume that there's no
> shortcutting.  Should I just run through the list of modules and install
> each individually?
>

Yes, there is no bundle -- you'll have to install all of the Perl
modules one-by-one (although if you're using RPMs the installer may
automatically pull in dependencies). Me, I ran "perl -MCPAN -e install
Module::Name" (replacing Module::Name with the actual module name) and
allowed Perl to pull in all of the dependencies for me. They'll
probably be much more up to date than the RPMs.

>
> Q2:  Some of the Perl module names listed look awfully similar to the RPMs I
> installed with yum.  For example, memcached, which I posted about earlier
> today.  In the list of Perl modules that I need, I see this:
>
> Cache::Memcached
>
> I can see (using rpm –q) that I have:
>
> memcached-1.2.1-1.fc6.mf
>
> But when I try to determine whether I have the appropriate Perl module
> (using several methods I found on cpan.org), I find nothing.  So are these
> two things (Memcached the Perl module and memcached the daemon) related at
> all?
>

In many cases, there is a binary library that gets installed (such as
memcached) that was written in C or C++ and only provides an interface
for C / C++ programs. Then there is a corresponding "wrapper" library
for other languages that exposes an interface for programs in other
languages to that base binary library. This is probably the situation
with memcached vs. Cache::Memcached for Perl.

>
> Q3:  This of course begs the question - what is the best way to figure out
> if you already have a Perl module?  I tried three different methods:
>
> perllocal.pod – This file does not exist.
>
> ExtUtils::Installed – I  made a little shell script that invokes perl and
> uses this module, but running it finds only Perl -- 5.8.8!
>
> perl –M[modulename] –e 1 – This  only finds DBD:Pg and CGI.
>
> So the latter seems to be the most inclusive.  For fun, I did an install of
> Cache::Memcached from CPAN.  All three methods find it!

The latter approach seems to work well here, as long as you take no
output as a sign of success and  output to STDERR as a sign of a
missing module.

> Thanks for any advice you might have.  I will proceed with installing each
> module individually... I'll post more questions as I have them.

Great! Thanks for tackling this!


More information about the Open-ils-dev mailing list