.lib/perl5/Autofetch.pm

changeset 690
d005acd0e883
parent 682
31d13f6d3a30
child 852
cf73e0ff4258
equal deleted inserted replaced
689:840057d4b493 690:d005acd0e883
8 my ($path, $module) = @_; 8 my ($path, $module) = @_;
9 system 'cpanm', -nq, -l => $path, $module; 9 system 'cpanm', -nq, -l => $path, $module;
10 } 10 }
11 11
12 sub cachepath { 12 sub cachepath {
13 catfile($ENV{HOME}, '.cache', 'lib', rel2abs($_[0]) =~ y|/ |-_|r); 13 catfile(glob('~'), '.cache', 'lib', rel2abs($_[0]) =~ y|/ |-_|r);
14 } 14 }
15 15
16 sub modulefy { $_[0] =~ s/\.pm$//r =~ s|/|::|gr } 16 sub modulefy { $_[0] =~ s/\.pm$//r =~ s|/|::|gr }
17 17
18 sub import { 18 sub import {

mercurial