LoginSignup
10
10

More than 5 years have passed since last update.

carton で社内レポジトリなどを指定する

Last updated at Posted at 2012-12-26

環境変数 PERL_CARTON_MIRROR を指定すれば良いみたいです。

ソースを読むと

lib/Carton.pm
our $DefaultMirror = 'http://cpan.metacpan.org/';

sub new {
    my($class, %args) = @_;
    bless {
        path => $ENV{PERL_CARTON_PATH} || 'local',
        mirror => $ENV{PERL_CARTON_MIRROR} || $DefaultMirror,
    }, $class;
}

となっています。で、

lib/Carton.pm
        ( $mirror ne $DefaultMirror ? "--mirror-only" : () ),

とか、

lib/Carton.pm
       ( $is_default_mirror ? () : "--mirror-only" ),

とかされているので、PERL_CARTON_MIRROR を使うと --mirror-only
になるようです。

PERL_CPANM_OPT=--mirror 社内レポジトリ --mirror-only していた
のに反映されないので確認したらこうなってました。

内部的に cpanm を使っているのでこの辺うまく共有してもらえると
嬉しいなー。。

10
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
10