[OPEN-ILS-DEV] another newbie q, Perl modules
Joe Atzberger
atzberger at MECDC.ORG
Mon Apr 16 16:33:21 EDT 2007
Natasha Stephan wrote:
> Should I just run through the list of modules and
> install each individually?
>
> Q2: Some of the Perl module names listed look awfully similar to the
> RPMs I installed with yum.
You still need to install them. The modules are usually what perl requires to interface with the installed components.
>
> Q3: This of course begs the question - what is the best way to figure
> out if you already have a Perl module?
A simple answer:
perl -e 'use Whatever::Module; print "ok\n";'
With that test, you either get the error message or "ok".
Or you can just try to install it with CPAN. If it is up to date, the output will say so (and do nothing):
perl –MCPAN –e 'install Whatever::Module;'
Otherwise, it will try to install/update it, which is what you would have to do anyway! The only cases where this is
bad are those where you deliberately want to stay at an older version of a module.
Lastly, I wrote a little script for installing all the Evergreen perl modules (see attached). The list may no longer be
comprehensive or current (check docs), but you can see it is trivial to update. Just add to the list at the top.
--Joe Atzberger
INFOhio Technical Specialist
Metropolitan Educational Council
(614) 473-8300 x22
atzberger at mecdc.org
-------------- next part --------------
#!/bin/perl -w
#
use CPAN;
# GD::Graph # ( ::pie, :bars3d, ::lines3d)?
# Net::Z3950 # (requires yaz and Event.pm)
my @parts = qw (
APR::Const
Class::DBI
CGI
DateTime
DateTime::Format::ISO8601
Digest::MD5
GD::Graph
LWP::UserAgent
MARC::Record
MARC::Charset
MARC::File::XML
Net::Z3950
Spreadsheet::WriteExcel
Template
Template::Stash
Text::CSV_XS
Time::HiRes
XML::LibXSLT
XML::LibXML
XML::SAX
XML::Simple
UNIVERSAL::require
Javascript::SpiderMonkey
Email::Send
);
print "List contains ", scalar(@parts), " modules\n";
for (@parts) {
install($_) or next;
}
More information about the Open-ils-dev
mailing list