Re: CPAN shell - passing params for module installation
by monarch (Priest) on Jan 18, 2007 at 08:32 UTC
|
I do it this way after starting perl -mCPAN -e 'CPAN::shell':
o conf makepl_arg arguments
install package
So in your case you might write a script to start Perl as above and then feed in:
o conf makepl_arg --perl_only
install version
or similar.
I've done this with an automated installer that uses the GD module (which requires -options JPEG,PNG,GIF fed to the makefile) and the libwww-perl module (which required -n to be fed to the makefile). | [reply] [d/l] [select] |
|
| [reply] |
|
o conf makepl_arg --perl_only
Seems to do the job, I was trying something like:
o conf makepl_arg PREFIX=--perl_only
But that didn't work.
Argh! The problem is, I'm already passing something like this to the CPAN shell:
o conf makepl_arg LIB=/path/to/my/distros/perllib
When you set the "--perl_only" paramater, it erases the "LIB=" paramater.
I guess I have to figure out how to pass both configuration thingies.
| [reply] [d/l] [select] |
|
Shouldn't putting them all on one line work? Like
o conf makepl_arg LIB=/path/to/my/distros/perllib PREFIX=--perl_only
Update: Or edit ~/.cpan/CPAN/MyConfig.pm directly and set the things you need from there.
-- Hofmator
Code written by Hofmator and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
| [reply] [d/l] [select] |
|
|
Re: CPAN shell - passing params for module installation
by randyk (Parson) on Jan 18, 2007 at 05:17 UTC
|
If you anticipate having to do this more than once for a given package, it may be worth looking at
DistroPrefs in the current development CPAN.pm version. | [reply] |
|
| [reply] |
|
| [reply] |
Re: CPAN shell - passing params for module installation
by Anonymous Monk on Jan 18, 2007 at 04:14 UTC
|
cpan> look version
| [reply] [d/l] |
|
OK, so you do that command, to open up a shell, *within* the cpan shell, manually install it with the paramater --perl_only *and* any other parameters I set in the cpan shell -
That's not obvious AT ALL, but I appreciate the pointers. Maybe next time, post, not anonymously and perhaps a bit more friendly? I'm a friendly guy, this is a friendly place.
| [reply] |
|
Maybe next time, post, not anonymously and perhaps a bit more friendly?
like this perhaps?
perl -le 'print map{pack c,($-++?1:13)+ord}split//,"ESEL\c_:,("'
;-)
--shmem
update: the Anonymous Monk wasn't me.
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
| [reply] [d/l] |
|
|
|
|
| [reply] |
|
Otherwise, you'll get missing dependency complaints and will have to go back to CPAN to install them. It's a mess.
Eh
cpan> test version
cpan> look version
...
| [reply] [d/l] |