File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 33
44 * Create p5stack directory if missing (Issue#2, reported by AMBS++).
55 * Attempt to warn about cpanm misses (Issue#3, reported by AMBS++).
6+ * Fix use of local dzil
67
780.003 2015-11-19 22:29:12+00:00 Europe/Lisbon
89
Original file line number Diff line number Diff line change @@ -111,15 +111,24 @@ sub _do_setup {
111111 my $cpanm = $self -> _get_cpanm;
112112
113113 if ($self -> {deps } eq ' dzil' ) {
114- my $dzil = which ' dzil' ;
115- $self -> _do_cpanm(" Dist::Zilla" ) unless $dzil ;
116114
117115 unless (-e catfile($self -> {home },' dist.ini' )) {
118116 _log(' Configuration is set to use "dzil" to gather dependencies information, but no "dist.ini" file was found in current directory.. exiting.' );
119117 exit ;
120118 }
121- system " $dzil listdeps | $cpanm --no-sudo -l $self ->{local_lib}" ;
122- $self -> {cpanm_flag } = $? >> 8;
119+
120+ my $dzil = which ' dzil' ;
121+ if ($dzil ) {
122+ system " $dzil listdeps | $cpanm --no-sudo -l $self ->{local_lib}" ;
123+ $self -> {cpanm_flag } = $? >> 8;
124+ }
125+ else {
126+ $self -> _do_cpanm(" Dist::Zilla" );
127+ my $bin = catfile($self -> {local_bin }, ' dzil' );
128+ my @env = (" PERL5LIB=$self ->{Ilib}" , " PATH=$self ->{local_bin}:\$ PATH" );
129+ system join (' ' , @env , " $bin listdeps | $cpanm --no-sudo -l $self ->{local_lib}" );
130+ $self -> {cpanm_flag } = $? >> 8;
131+ }
123132 }
124133 if ($self -> {deps } eq ' cpanfile' ) {
125134 unless (-e catfile($self -> {home },' cpanfile' )) {
You can’t perform that action at this time.
0 commit comments