1

I am trying to run build a Perl project. When I try perl Build.PL, I get an error:

Can't locate Module/Build.pm in @INC

I installed CPAN and tried cpan Module::Build. However when I do that I get an error: Can't locate Module/Metadata.pm in @INC

I tried installing metadata but tests are failing. Is there a way to install Build.pm and all its dependencies at one go

user1692342
  • 5,007
  • 11
  • 69
  • 128
  • 1
    Your question of how to install dependencies is already extensively answered here: https://stackoverflow.com/questions/898782/how-do-i-tell-cpan-to-install-all-dependencies Another possibility mentioned in one of the answers there is to use `cpanm`. – nlu Jun 19 '17 at 07:49

1 Answers1

1

If you want to install a module with dependencies you need to set the following in cpan:

cpan> o conf prerequisites_policy 'follow'
cpan> o conf build_requires_install_policy yes
cpan> o conf commit