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 10:27 AM
Box A's perl script calling box B's shell script new2ss Shell Programming and Scripting 1 09-13-2006 07: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 10:55 PM
Correct Syntax For Calling Shell Script in Perl Module mh53j_fe Shell Programming and Scripting 4 06-08-2005 11:42 AM
calling dos2unix on shell script from within the script vino Shell Programming and Scripting 4 04-08-2005 04:38 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-08-2002
sdiva sdiva is offline
Registered User
  
 

Join Date: Feb 2002
Posts: 2
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
  #2 (permalink)  
Old 02-09-2002
mib mib is offline
Registered User
  
 

Join Date: Jan 2001
Location: Calicut
Posts: 228
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
sdiva sdiva is offline
Registered User
  
 

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

sdiva
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:15 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0