XML::RSS

James at bigfoot.com jandanz at bigfoot.com
Fri Apr 25 18:49:17 CDT 2003


I have just found in the Perl documentation a reference to 
use lib
<quote>
Probably the most convenient solution from your users' perspective is
for you to add a use lib pragma near the top of your script. That way
the users of the program don't need to take any special action to run
your program. Imagine a hypothetical project called Spectre whose
programs rely on its own set of libraries. Those programs could have a
statement like this at their start:

use lib "/projects/spectre/lib";
</quote>
I presume that this would be put into a Begin sub:
Begin (
     use lib "/projects/spectre/lib";
)
James
On Thu, 2003-04-24 at 22:56, Ewen McNeill wrote:
> In message <1051180865.2041.47.camel at argon>, "James @bigfoot.com" writes:
> >On Thu, 2003-04-24 at 20:15, Ewen McNeill wrote:
> >> For instance, suppose that you create a "local-libs" directory under the
> >> cgi-bin directory, and have: 
> >> 
> >> ..../cgi-bin/local-libs/XML/RSS.pm
> >
> >Wouldn't it be just as easy to put XML::RSS module in the cgi-bin.
> >Wouldn't that in the @inc path?
> 
> You can't just put RSS.pm in the cgi-bin directory, and expect to do
> "use XML::RSS".  Even if the cgi-bin directory were in the @INC path
> (which it might be either in the website's perl setup, or via "." being
> in the @INC path, and it being the current directory at invocation
> time), Perl is still going to want to see the directory structure.
> 
> You might be able to get away with:
> 
> ..../cgi-bin/XML/RSS.pm
> 
> but personally I'd find that a bit messy if I had to deal with a bunch
> of libraries "included" like that.
> 
> Ewen
> 
-- 
===================
James J. Eaton
james at eaton.net.nz
===================
-- 
====================
James J. Eaton
jandanz at bigfoot.com
====================
==




More information about the Wellington-pm mailing list