Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I build a Perl distribution with DIst::Zilla and use Carton for dependencies?

I have a perl distribution I have built with Dist::Zilla, and so I do not have to contaminate my installed Perl's lib with the dependencies, I have used Carton to manage them.

Things work great in development, but when I run dzil test or dzil release and tests are run, then the dependencies are not found and tests fail because the modules cannot be loaded.

I have tried carton exec -- dzil test and PERL5LIB=local/lib/perl5 dzil test but I think that means i need to put all my Dist::Zilla deps into the cpanfile, which seems plain wrong (I do have Dist::Zilla and the deps I need installed in my perl's lib path).

Is there a better way?

like image 981
cubabit Avatar asked Jul 01 '14 16:07

cubabit


1 Answers

I solved it with:

export PERL5LIB=$PERL5LIB:/absolute/path/to/project/local/lib/perl5; dzil release
like image 69
cubabit Avatar answered Nov 14 '22 16:11

cubabit