2

I've got perlbrew installed on OS X fine, and can install Perl modules from CPAN, using cpanm no problem.

But, now I'm attempting to install a Perl module provided from a software vendor, and that PM is not on CPAN - you download it from their application and install it "locally".

How can I do this with perlbrew?

The documentation states to do a direct install, download the tar.gz file, extract it, then:

$ cd Infoblox-xxxxxxx/
$ perl Makefile.PL
... misc output here
$ make
... misc output here
$ make install
... misc output here

But if I do this, I guess it will install it for the OS Perl version, not my perlbrew install.

The other option mentioned is to create a local CPAN site and add the appliance URL (to grab the Perl module) to the list of sites. Is this possible with perlbrew?

Mike Pennington
  • 41,899
  • 19
  • 136
  • 174
kpw
  • 45
  • 7

1 Answers1

6
$ cd Infoblox-xxxxxxx/
$ perl Makefile.PL
... insert misc output here ...

$ make
... insert misc output here ...

$ make install
... insert misc output here ...

But if I do this, I guess it will install it for the OS Perl version, not my perlbrew install.

If you are using perlbrew to select your perl, it should install in the appropriate location for the perl you selected.

which perl will tell you which perl you are using.

If you want to use a specific perl without leaving things to perlbrew, you can always invoke the specific perl you want using its full path:

 cd Infoblox-xxxxxxx/
 ~/perl5/.../bin/perl Makefile.PL
 make
 make install
Mike Pennington
  • 41,899
  • 19
  • 136
  • 174
Sinan Ünür
  • 116,958
  • 15
  • 196
  • 339
  • Yes ! That was simple. Being new to perlbrew, it threw me when I had to install a module not through cpanm! Thanks. ;-) – kpw Mar 05 '15 at 17:00
  • 2
    @kpw, they key is just to remember that `perlbrew` changes what binary is pointed to by `perl` on your commandline, and the install scripts all rely on the currently-executing `perl` to figure out where to install stuff. That was baked in to the binary when you installed via `perlbrew`. – friedo Mar 05 '15 at 19:28
  • You should do `perlbrew list` to see which version of Perl is active. Also, `perl -MData::Dumper -e 'print Dumper \@INC'` will show you where `perl` will search for modules. – shawnhcorey Mar 06 '15 at 13:31