LoginSignup
1
0

More than 5 years have passed since last update.

Builder.pm を書き換えて、Carton で prompt オプションを使う

Posted at

Mac に Carton で CSS::Sass をインストールしようとしたら、
ld: unknown option: --no-as-needed
というエラーが出た。

cpanm--prompt を使って処理を止め、
Makefile.PL から、該当のオプション群を削除したら通った。

しかし、carton--promptを使う方法が分からなかった。

仕方ないので、直接ファイルを書き換えた。

vi ~/.plenv/versions/5.25.3/lib/perl5/site_perl/5.25.3/Carton/Builder.pm

Carton の Builder.pm の install に、--prompt を付けると、止まってくれる。

 47 sub install {
 48     my($self, $path) = @_;
 49
 50     $self->run_cpanm(
 51         "-L", $path,
 52         (map { ("--mirror", $_->url) } $self->effective_mirrors),
 53         ( $self->index ? ("--mirror-index", $self->index) : () ),
 54         ( $self->cascade ? "--cascade-search" : () ),
 55         ( $self->custom_mirror ? "--mirror-only" : () ),
 56         "--save-dists", "$path/cache",
 57         $self->groups,
 58         "--cpanfile", $self->cpanfile,
 59         "--installdeps", $self->cpanfile->dirname,
 60         "--prompt"
 61     ) or die "Installing modules failed\n";
 62 }

どうするのが正道なのだろうか。

1
0
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
1
0