Question

How do I properly set the shibang for perlbrew environment for CGI as apache will not load any env details?

I could use -I, however, how do i list multiple libraries as there is 2.

#!/home/user/perl5/perlbrew/perls/perl-5.10.1/bin/perl -wTI /home/user/perl5/perlbrew/perls/perl-5.10.1/lib

Thats how I can get one, how do I add a second library, and even if I did will this work?

Was it helpful?

Solution 2

I ended up doing it in the shabang:

#!/home/user/perl5/perlbrew/perls/perl-5.10.1/bin/perl -wTI /home/user/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1 /home/user/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1

OTHER TIPS

  1. You can use -I more than once.

  2. I'd use use lib "path", "path"; instead of placing -I in the shebang line.

  3. $install_dir/lib shouldn't contain any modules. They should be in one of the following, all of which are already in the @INC for $install_dir/bin/perl.

    • $install_dir/lib/5.10.1 (Core modules with no build-specific components)
    • $install_dir/lib/5.10.1/$arch (Core modules with build-specific components)
    • $install_dir/lib/site_perl/5.10.1 (User-installed modules with no build-specific components)
    • $install_dir/lib/site_perl/5.10.1/$arch (User-installed modules with build-specific components)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top