Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

cgi use custom lib as last recourse

by leocharre (Priest)
on Feb 11, 2010 at 16:06 UTC ( [id://822677]=perlquestion: print w/replies, xml ) Need Help??

leocharre has asked for the wisdom of the Perl Monks concerning the following question:

I'm thinking of packaging a web interface to an application.

There are deps- Such as CGI::Session, for example. So something occurred to me- to potentially make it extra easy for everyday people to use- who might or might not have perl module deps system wide. But if they do- use that as a default.

I could include in the distro, a lib/depshere filesystem "branch" with the some module deps. But what if they already have the modules installed on the system?

I basically would want to look inside the ./ path as a last, not first recourse. Should I simply reverse @INC, or do something like a push @INC, $pathtoaltlib in a BEGIN block? The last seems to work.

Seems that if I don't use 'use lib..' at all- the cwd is scanned as a last place to look into.

Replies are listed 'Best First'.
Re: cgi use custom lib as last recourse
by ikegami (Patriarch) on Feb 11, 2010 at 16:15 UTC
    If they can install your module, they can install the dependencies too.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://822677]
Approved by hok_si_la
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-18 23:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found