XML::RSS

Ewen McNeill ewen at naos.co.nz
Thu Apr 24 03:15:21 CDT 2003


NOTE: CC'd back to the Perl Mongers list 'cause I figure others might be
interested.

In message <1051171567.2047.39.camel at argon>, James J Eaton & Annette Eaton writes:
>On Thu, 2003-04-24 at 19:57, Ewen McNeill wrote:
>> - upload the XML::RSS module files to sit in your cgi-bin directory, and
>>   add the appropriate directory to your perl @INC path
>
>I like this option, but how can a user change the @INC path for their
>hosting service? Is it easy to do, or is each site going to be different?

What I'd suggest doing is uploading it to a subdirectory of cgi-bin, and
then having the script push an appropriate relative path onto the @INC
path.

For instance, suppose that you create a "local-libs" directory under the
cgi-bin directory, and have: 

..../cgi-bin/local-libs/XML/RSS.pm

Then your cgi-bin script could contain:

push @INC, "local-libs";

and it should be fine.  This is all off the top of my head, but I think
it should work give or take:
- the @INC modifications might need to be done in a BEGIN { } block to
  ensure they happen early enough; 
- you might need to fiddle with the exact path to get the one that
  corresponds with the CGI spec.  IIRC cgi-bin programs are supposed to
  be run with the current directory of their binary directory, but I may
  be misremembering, as it's ages since I've written/installed a cgi-bin
  script that cared.

Ewen



More information about the Wellington-pm mailing list