Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: CPAN shell - passing params for module installation

by monarch (Priest)
on Jan 18, 2007 at 08:32 UTC ( #595198=note: print w/replies, xml ) Need Help??


in reply to CPAN shell - passing params for module installation

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).

Replies are listed 'Best First'.
Re^2: CPAN shell - passing params for module installation
by xdg (Monsignor) on Jan 18, 2007 at 12:47 UTC
    o conf makepl_arg --perl_only

    If there are dependencies that CPAN has to build first, that will get passed to all of their Makefile.PL's, too.

    -xdg

    Code written by xdg 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.

Re^2: CPAN shell - passing params for module installation
by skazat (Chaplain) on Jan 18, 2007 at 09:05 UTC

    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.

     

    -justin simoni
    skazat me

      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.

        This works, as long as you put single quotes around the whole makepl_arg value:
        o conf makepl_arg 'LIB=/path/to/my/distros/perllib PREFIX=--perl_only'
        Otherwise, only one of the values is used.

        Shouldn't putting them all on one line work? Like

        o conf makepl_arg LIB=/path/to/my/distros/perllib PREFIX=--perl_only

        Usually, everything but the last configuration gets dropped. Usually.

        Update: Or edit ~/.cpan/CPAN/MyConfig.pm directly and set the things you need from there. I'm changing the configuration while in the CPAN shell to download CPAN modules to a specific location, so I can then add the modules to a distro. Basically.

         

        -justin simoni
        skazat me

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://595198]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2022-06-25 05:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (81 votes). Check out past polls.

    Notices?