How can I use the modules with the Perl I package compiled by me?

My OS-Distribution provides the rpm package "perl-obexftp", which installs the "OBEXFTP" module. 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 now using Perl, which I created from the source. Is there an easy way to make this OBEXFTP module available for my Perlin installation?

+4
source share
1 answer

Choose one of

  • Add the following pragma to your code:

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

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

  • Rebuild perl so that the path is clamped by @INC

  • Create a module yourself using your own perl

See perlrun for details .

+6
source

Source: https://habr.com/ru/post/1301111/


All Articles