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

cgi use custom lib as last recourse

by leocharre (Priest)
on Feb 11, 2010 at 16:06 UTC ( #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 (Pope) on Feb 11, 2010 at 16:15 UTC
    If they can install your module, they can install the dependencies too.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://822677]
Approved by hok_si_la
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2018-03-17 19:17 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (225 votes). Check out past polls.