LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   CPAN and PERL Modules (https://www.linuxquestions.org/questions/programming-9/cpan-and-perl-modules-617708/)

metallica1973 01-31-2008 12:13 PM

CPAN and PERL Modules
 
From the CLI:

PHP Code:

 perl -MCPAN -e shell 

would

PHP Code:

cpaninstall XML::LibXML::SAX 

install the dependencies as well?

Tinkster 01-31-2008 03:30 PM

Depends on what you set on CPANs first run, when it prompts for configuration
data. Find your Config.pm and grep it for prerequisites_policy ....



Cheers,
Tink

forrestt 01-31-2008 03:37 PM

You can also just set it to follow by executing the following within the shell.

Code:

cpan> o conf prerequisites_policy follow
HTH

Forrest

metallica1973 02-01-2008 08:13 AM

sweet, thanks

sundialsvcs 02-01-2008 09:14 PM

It's also worth mentioning that some distributions (like Gentoo) use Perl as the core-language of their maintenance system. To help protect that system, they ship slightly-unconventional defaults for fundamental things like the order of the @INC list.

You might therefore find yourself in a situation that is directly analogous to "installing Perl stuff on a shared-hosting system where you are not allowed to supersede the system defaults but must instead make a 'per-user' type of installation." Perl does support this, through facilities like PERL5LIB, PREFIX, and various CPAN configuration-settings. In fact, it does it quite well. But, it's not entirely obvious.

What those vendors are intentionally trying to ensure is, in fact, what you can thereby achieve, namely: you can set up your Perl any way that you like, without being able to inadvertantly "torch" the Perl configuration upon which the distro's maintenance-software depends.


All times are GMT -5. The time now is 08:44 AM.