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

My mod_perl handler is started with use lib "/home/hive/25167/perl/lib" as described in the mod_perl manual on @INC.
This does not include the /home/hive/25167/perl/lib/i686-linux-thread-multi subdirectory. What am i doing wrong here?

@INC:
/cadappl/perl/5.8.0/lib/site_perl/5.8.0/i686-linux-thread-multi/Apache +2 /home/http/pww/25167/ /home/hive/25167/perl/lib /cadappl/perl/5.8.0/lib/5.8.0/i686-linux-thread-multi /cadappl/perl/5.8.0/lib/5.8.0 /cadappl/perl/5.8.0/lib/site_perl/5.8.0/i686-linux-thread-multi /cadappl/perl/5.8.0/lib/site_perl/5.8.0 /cadappl/perl/5.8.0/lib/site_perl . /home/http/pww/25167/lib/perl

Replies are listed 'Best First'.
Re: "use lib" not adding i686-linux-thread-multi subdir
by gellyfish (Monsignor) on Jan 17, 2005 at 10:51 UTC

    As described in the lib documentation, the architecture specific directory will only be added to @INC if there is an auto subdirectory - you should check that you have a /home/hive/25167/perl/lib/i686-linux-thread-multi/auto directory.

    /J\

      The auto subdir does exist,a nd it works fine on the command-line.
Re: "use lib" not adding i686-linux-thread-multi subdir
by PodMaster (Abbot) on Jan 17, 2005 at 10:58 UTC
    Does /home/hive/25167/perl/lib/i686-linux-thread-multi/auto exist? It should.

    Still, it seems like a bug that lib.pm should check for it (its the only case where it does).

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Re: "use lib" not adding i686-linux-thread-multi subdir
by redhotpenguin (Deacon) on Jan 17, 2005 at 14:29 UTC
    'My mod_perl handler is started with use lib "/home/hive/25167/perl/lib" as described in the mod_perl manual on @INC.'

    You have specified use lib in your handler, but the documentation says to put this pragma in your startup.pl. I think that may be your problem. Your @INC may be getting modified at runtime, not startup.

    In the startup file directly alter the @INC. For example
    
    startup.pl ---------- use lib qw(/home/httpd/perl /home/httpd/mymodules); 1;
    and load the startup file from the configuration file by:
    PerlRequire /path/to/startup.pl
Re: "use lib" not adding i686-linux-thread-multi subdir
by doink123 (Sexton) on Jan 17, 2005 at 10:52 UTC
    Well, you are not using use lib ('/home/hive/25167/perl/lib', '/home/hive/25167/perl/lib/i686-linux-thread-multi'); I suppose.