Solved

how to add a library

Posted on 1999-01-18
4
259 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Check file date before getting folder path 1 80
Move Function in Perl Script 2 72
Replace  text in a file 2 114
Vb script to unzip a files and rename the files 5 95
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…

789 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