in reply to automatic/unattended cpan install

The easiest way to solve this problem is to create a CPAN::MyConfig file which has all the makepl_arg value set and also a ~/.modulebuildrc file.

~/.cpan/CPAN/MyConfig.pm

$CPAN::Config->{makepl_arg} = q[INSTALLARCHLIB=/home/.../.perl/lib INSTALLBIN=/home/.../bin INSTALLMAN1DIR=/home/.../.perl/man/man1 INSTALLMAN3DIR=/home/.../.perl/man/man3 INSTALLPRIVLIB=/home/.../.perl/lib INSTALLSCRIPT=/home/.../bin INSTALLSITEARCH=/home/.../.perl/lib INSTALLSITEBIN=/home/.../bin INSTALLSITELIB=/home/.../.perl/lib INSTALLSITEMAN1DIR=/home/.../.perl/man/man1 INSTALLSITEMAN3DIR=/home/.../.perl/man/man3 INSTALLVENDORARCH=/home/.../.perl/lib INSTALLVENDORBIN=/home/.../bin INSTALLVENDORLIB=/home/.../.perl/lib INSTALLVENDORMAN1DIR=/home/.../.perl/man/man1 INSTALLVENDORMAN3DIR=/home/.../.perl/man/man3];

~/.modulebuildrc

--installpath lib=/home/.../.perl/lib --installpath arch=/home/.../.perl/lib --installpath bin=/home/.../bin --installpath bindoc=/home/.../.perl/man/man1 --installpath libdoc=/home/.../.perl/man/man3

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Replies are listed 'Best First'.
Re^2: automatic/unattended cpan install
by raiten (Acolyte) on Mar 22, 2007 at 20:52 UTC
    ok for .modulebuildrc, i missed this config file.

    works ok for direct install. fail if deps :(
    perl -MCPAN -e "install DateTime::TimeZone"


    why do we need to put all env/prefix ? with command line, 1 argument (PREFIX) is sufficient ... strange. can i use env variable or perl var to avoid repeating same path ? seems not:
    my $local_prefix = '/home/touche/.cpan/local'; $CPAN::Config->{makepl_arg} = q[INSTALLARCHLIB=$local_prefix/lib INSTA +LLBIN=$loc al_prefix/bin INSTALLMAN1DIR=$local_prefix/man/man1 INSTALLMAN3DIR=$lo +cal_prefix /man/man3 INSTALLPRIVLIB=$local_prefix/lib INSTALLSCRIPT=$local_prefix +/bin INSTA LLSITEARCH=$local_prefix/lib INSTALLSITEBIN=$local_prefix/bin INSTALLS +ITELIB=$lo cal_prefix/lib INSTALLSITEMAN1DIR=$local_prefix/man/man1 INSTALLSITEMA +N3DIR=$loc al_prefix/man/man3 INSTALLVENDORARCH=$local_prefix/lib INSTALLVENDORBI +N=$local_p refix/bin INSTALLVENDORLIB=$local_prefix/lib INSTALLVENDORMAN1DIR=$loc +al_prefix/ man/man1 INSTALLVENDORMAN3DIR=$local_prefix/man/man3];
    failed

    else do you know a way to launch install like 'perl -MCPAN -e "install xxx" -f MyConfig.pm -f modulebuildrc' ? or to force to accept/refuse deps (to be non-interactive) ? disable "make test" ? force install without dependancies check ?

    anyway thanks a lot :)