Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: use lib in cgi env

by talexb (Canon)
on Nov 05, 2012 at 14:57 UTC ( #1002337=note: print w/replies, xml ) Need Help??

in reply to use lib in cgi env

Some meta-suggestions:

  • Wrap your code in code tags to help make it stand out.
  • If something's 'completely weird', tell us what's weird about it -- what you expected, what actually happened, and how that disagrees with the documentation.

I suspect you didn't read what use lib actually does, otherwise you'd have a better idea what it was doing. It adds a directory path to @INC to provide Perl with additional locations for modules.

I expect you want

use lib '/home/user/test-workspace/trunk/modules';
for development and
use lib '/home/user/webpage/modules/';
for production.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Replies are listed 'Best First'.
Re^2: use lib in cgi env
by AlexTape (Monk) on Nov 05, 2012 at 15:37 UTC
    the weird thing is that i am not able to use a relative lib because he is mixing the pathes.. is there any kind of priority or something like this in which order perl looks for the modules in the known folder (@INC)?
    $perlig =~ s/pec/cep/g if 'errors expected';

      Yes - see perlvar for @INC, which links to require, which shows the (pseudo-)code that require uses. It looks through @INC in order of entry appearance.

        looks good. thanks!
        $perlig =~ s/pec/cep/g if 'errors expected';

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1002337]
[marto]: I think that actually caught up with me yesterday, felt a really sharp pain where my neck meets my skull.
[Corion]: marto: Ouch, yeah...
[marto]: the boys uncle will take them for a couple of hours this afternoon :)
[marto]: only at work 3 days this week, then off to Copenhagen for a wedding
[marto]: back the following Monday, potentially gone 2-3 days the next week for work
[Corion]: Oh - "Cyber Monday" week is coming up... That's why weird stuff is already discounted now...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2017-11-19 11:35 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (280 votes). Check out past polls.