1

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?

Kizzim
  • 112
  • 1
  • 7
  • 1
    More `-I` options. But if you're editing the script file to begin with, why not just add some `use lib` lines? – hobbs Mar 15 '14 at 03:39
  • I ended up doing it in the shabang, its nasty for now, but basically #!/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 – Kizzim Mar 19 '14 at 22:28

2 Answers2

1
  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)
ikegami
  • 367,544
  • 15
  • 269
  • 518
0

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
Kizzim
  • 112
  • 1
  • 7