Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re^3: Personal library with CPAN

by Zaxo (Archbishop)
on May 18, 2006 at 11:06 UTC ( #550212=note: print w/replies, xml ) Need Help??

in reply to Re^2: Personal library with CPAN
in thread Personal library with CPAN

In a .htaccess file, put

SetEnv PERL5LIB /where/the/mods/are/:/where/else/lib
The web server must be able to read files in those directories, of course. Apache suExec is a great help with that, for security's sake.

See the apache httpd manual for variations that might be handy. When mod_perl is involved, I believe PerlSetEnv is needed, but I've never tried that.

After Compline,

Replies are listed 'Best First'.
Re^4: Personal library with CPAN
by monkfan (Curate) on May 18, 2006 at 12:06 UTC

    I do not have a root (SU) access. Thus, I believe .htaccess cannot be accessible to me. Am I right?
    Is there a way to include somekind of snippet in my CGI script to do the similar thing?
    As you mentioned also earlier as another alternative.

    Update: Along with Zaxo's suggestion above, I can only get my my script going after inserting the following snippet. For further info.
    #!/usr/bin/perl -w use CGI ':standard'; # Newly inserted BEGIN { if ( $ENV{PERL5LIB} and $ENV{PERL5LIB} =~ /^(.*)$/ ) { # Blindly untaint. Taintchecking is to protect # from Web data; # the environment is under our control. eval "use lib '$_';" foreach ( reverse split( /:/, $1 ) ); } } use Mail::Sendmail;


      No, you're not right. The .htaccess files are local to your web space and are owned by you. You should take a good read in the apache manual. All this stuff is covered there

      After Compline,

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://550212]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2020-08-03 14:56 GMT
Find Nodes?
    Voting Booth?
    Which rocket would you take to Mars?

    Results (27 votes). Check out past polls.