Solved

how to add a library

Posted on 1999-01-18
4
237 Views
Last Modified: 2010-03-05
I am trying to teach myself perl the 'look at other peoples code' method.  It is going well enough.  Now, I have collected a script that starts as follows:

#!/usr/bin/perl
## Program Name: fetch.cgi
use CGI;
use CGI::Carp (fatalsToBrowser);
use LWP::Simple;

My problem is the last line shown above.  I do not have the Simple routines.  How do I get them and install them.

Actually, I do not really understand how to add libraries at all, or where to find them.  By server is running linux on a 386 arcgitecture macgine if this matters.
0
Comment
Question by:jhurst
  • 2
4 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 1210204
0
 

Expert Comment

by:tdv
ID: 1210205
The easiest way to install a module is using the CPAN module that is installed with recent perls.
Try (on the command line):
perl -MCPAN -e "install LWP::Simple"
CPAN stands for Comprehensive Perl Archive Network, a mirrored set of sites that store perl and its modules. The CPAN module automatically locates a CPAN site, downloads the module and installs it.
0
 
LVL 8

Author Comment

by:jhurst
ID: 1210206
tdv,

your method does not work.  

Actually, I discovered that I could just tar the file that ozo recommended in the appropriate place, end of story.

ozo, If you will post an answer, saying anything, I will give you the points.

0
 
LVL 84

Accepted Solution

by:
ozo earned 100 total points
ID: 1210207
You can search for modules at
http://cpan.perl.com/
or
http://theory.uwinnipeg.ca/mod_perl/cpan-search.pl
I'd also second tdv's suggestion on using the CPAN module http://www.perl.com/CPAN/authors/id/ANDK/CPAN-1.44.tar.gz
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now