Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl Module

Status
Not open for further replies.

loriek

Technical User
Jul 27, 2007
40
US
I'm a linux admin. so please bear with me. My developer has a perl module and is asking me to install it.

Can someone tell me what that means and how to do it??

Thanks.

 
It's basically a library that will facilitate the programmer to carry out some task in Perl (e.g. sending mails, parsing various file formats, interacting with databases, etc).

How you'd install it depends on the distribution of linux you're using.
 
Thanks. This is Redhat. Is it just an rpm?

I'm assuming it's something in the 5 -15 minute range and not the 1/2 day to full day range.

Thanks again.
 
If its a standard CPAN module it should install quickly. You can run into problems installing some modules depending on a number of things. Your best bet is to just try installing it and see if all goes well, if not, perl will report some errors that inhibited the installation. Whats the module they want installed?

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
perl -MCPAN -e 'install Image::Resize'
perl -MCPAN -e 'install GD'
perl -MCPAN -e 'install Business::OnlinePayment::AuthorizeNet'


That's the syntax and script, I think. Doesn't look like much, but then again, I'm a DBA, so I'd rather ask one of you experts....
 
First I would recommend searching your package manager. A lot of commonly used modules are probably already in your software repositories.

Code:
yum install perl-GD
yum install perl-XML-Parser
yum install perl-Regexp-Copy
etc

This is likely to work on a recent redhat system (RHEL5 for sure), if you don't have yum though or have the default software repos disabled for some reason this won't cut it.

You can try the syntax you posted to install things if you have the CPAN module. If it says "Can't locate CPAN.pm" though, try

Code:
yum install perl-CPAN

And for that matter, that would install the "cpan shell", where you can just execute commands like this:

Code:
# cpan install Image::Resize
(perl 5.8)

# cpan Image::Resize
(perl 5.10)

If the CPAN installer doesn't work (it "won't install without force" so if anything happens during its effort to install it, it will abort and not install it for you), you can always install things manually.

Most Perl modules you can just download as a tar.gz from cd to their directory and do

Code:
perl Makefile.PL
make
make test
make install

(the last one requires root)

-------------
Cuvou.com | My personal homepage
Code:
perl -e '$|=$i=1;print" oo\n<|>\n_|_";x:sleep$|;print"\b",$i++%2?"/":"_";goto x;'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top