The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
calling a script from a level above where the script resides SummitElse UNIX for Advanced & Expert Users 2 10-26-2007 06:27 AM
Box A's perl script calling box B's shell script new2ss Shell Programming and Scripting 1 09-13-2006 03:17 AM
Howto locate locally installed Perl module for a CGI script in APACHE .htaccess monkfan UNIX for Dummies Questions & Answers 0 05-18-2006 06:55 PM
Correct Syntax For Calling Shell Script in Perl Module mh53j_fe Shell Programming and Scripting 4 06-08-2005 07:42 AM
calling dos2unix on shell script from within the script vino Shell Programming and Scripting 4 04-08-2005 12:38 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-08-2002
Registered User
 

Join Date: Feb 2002
Posts: 2
Stumble this Post!
Question Calling privately installed module from script help please

hello,

i need help calling a privately installed module from a script. my server admin installed perl with the standard modules and simply no extras, including the LWP::Simple mod i need. (side note: ive asked for it to be installed).

in the meantime, i installed it (libwww-perl-5.62.tar.gz) into a privately created directory called 'myperl', using the steps decompress, unpack, build, install. on the 'build' step i entered:

$ perl Makefile.PL LIB=/home/virtual/admin/home/httpd/cgi-bin/myperl PREFIX=/home/virtual/admin/home/httpd/cgi-bin/myperl

everything seemed to work well... all mods are there.

my script (which is in cgi-bin/print directory) reads:

require 5;
use LWP::Simple;

cpan says to use one of the following:

1] foo@barbell$ setenv PERL5LIB /path/to/module sets the environment variable PERL5LIB.

2] use lib qw(/path/to/module); used at the top of your script tells perl where to find your module.

3] foo@barbell$ perl -I/path/to/module

in my script ive typed (one example of many variations ive tried):

require 5;
use LWP::Simple qw(/home/virtual/sbcadmin/home/httpd/cgi-bin/myperl/LWP/Simple.pm);

SIDE NOTE: my server info: Red Hat Linux release 6.0 (Hedwig)
Kernel 2.2.12-20ensim on an i686

is this simply something i cannot do without admin and root privileges or is my syntax incorrect somewhere?

thanks in advance,
sdiva
Forum Sponsor
  #2 (permalink)  
Old 02-09-2002
mib mib is offline
Registered User
 

Join Date: Jan 2001
Location: Calicut
Posts: 228
Stumble this Post!
Re: Calling privately installed module from script help please

Quote:
Originally posted by sdiva

in my script ive typed (one example of many variations ive tried):

require 5;
use 'LWP::Simple qw(/home/virtual/sbcadmin/home/httpd/cgi-bin/myperl/LWP/Simple.pm);

SIDE NOTE: my server info: Red Hat Linux release 6.0 (Hedwig)
Kernel 2.2.12-20ensim on an i686

is this simply something i cannot do without admin and root privileges or is my syntax incorrect somewhere?

thanks in advance,
sdiva [/b]
try:

require 5; #perl 5 or >
use lib '/home/virtual/sbcadmin/home/httpd/cgi-bin/myperl';

use LWP::Simple;

  #3 (permalink)  
Old 02-09-2002
Registered User
 

Join Date: Feb 2002
Posts: 2
Stumble this Post!
It worked perfectly. Thank you very much for the help!

sdiva
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:42 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0