4 use warnings; |
4 use warnings; |
5 use File::Spec::Functions qw(catfile rel2abs); |
5 use File::Spec::Functions qw(catfile rel2abs); |
6 |
6 |
7 sub fetch { |
7 sub fetch { |
8 my ($path, $module) = @_; |
8 my ($path, $module) = @_; |
|
9 return if |
|
10 system('cpm', 'install', -L => $path, $module) == 0; |
9 system 'cpanm', -nq, -l => $path, $module; |
11 system 'cpanm', -nq, -l => $path, $module; |
10 } |
12 } |
11 |
13 |
12 sub cachepath { |
14 sub cachepath { |
13 catfile(glob('~'), '.cache', 'lib', rel2abs($_[0]) =~ y|/ |-_|r); |
15 catfile(glob('~'), '.cache', 'lib', rel2abs($_[0]) =~ y|/ |-_|r); |