1 package Tak::ModuleSender;
4 use List::Util qw(first);
8 with 'Tak::Role::Service';
10 has dir_list => (is => 'lazy');
13 my %core = map +($_ => 1), @Config{qw(privlibexp archlibexp)};
14 [ map io->dir($_), grep !/$Config{archname}$/, grep !$core{$_}, @INC ];
17 sub handle_source_for {
18 my ($self, $module) = @_;
19 my $io = first { $_->exists } map $_->catfile($module), @{$self->dir_list};