On Sat, 8 Dec 2001, Hoenie Luk wrote:

> Hi, I'm new to cgi-programming with Perl and I've been looking for answers 
> for the following questions:
> 
> 1. How do you find out if the web host supports certain Perl modules?
> 
> 2. If the web host does not have certain modules installed and I need to 
> use them for my Perl cgi-script, what can I do?
> 

I'm guessing you're talking about your ISP as your web host, if so, the
only way I know how to do it is to actually put the "use" statement in an
cgi script and see if it works. Like:

test.pl
----

#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
use ?????::Module;

print header, start_html("test"), h1("Add test.");

-----

Where "?????::Module" is the one you need. Bit of a long way to go, but
the server will let you know if the module you need isn't installed.  
If it's not, what you could do is:

1.  Download and install the module on your home machine

2. Copy all the subroutines from the module (or just the subroutines you
actually need into your cgi script.  Again, a long way to go, but it
worked for me. You could use:

perldoc -m ?????::Module > test.cgi

Substitute your own headers, and put your code after the subroutines,
delteing everything else.  Should work the same the same as using the
module.  In my case it worked fine with Sort::Fields

good luck,

Jack Daly



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to