Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use vendor-packaged modules from a Perl I compiled myself?

My OS-Distribution provides the rpm-package "perl-obexftp", which installs the Modul "OBEXFTP". These are the files:

/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/OBEXFTP.pm
/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/OBEXFTP
/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/OBEXFTP/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/OBEXFTP/OBEXFTP.bs
/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/OBEXFTP/OBEXFTP.so
/var/adm/perl-modules/obexftp

I am using now a Perl which I have build from the source. Is there a simple way to make this OBEXFTP-module accesseble to my Perlinstallation?

like image 928
sid_com Avatar asked Feb 12 '10 13:02

sid_com


1 Answers

Choose one of

  • Add the following pragma to your code:

    use lib '/usr/lib/perl5/vendor_perl/5.10.0';
    
  • Add that path to the PERL5LIB environment variable

  • Invoke your code with perl -I/usr/lib/perl5/vendor_perl/5.10.0 program

  • Rebuild perl so that path is in its baked-in @INC

  • Build the module yourself using your custom-built perl

For details, see perlrun.

like image 108
Greg Bacon Avatar answered Oct 18 '22 05:10

Greg Bacon