File Coverage

blib/lib/Dist/Zilla/Role/ExecFiles.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 18 19 94.7


line stmt bran cond sub pod time code
1             # ABSTRACT: something that finds files to install as executables
2              
3             use Moose::Role;
4 17     17   9714 with 'Dist::Zilla::Role::FileFinder';
  17         59  
  17         170  
5              
6             use Dist::Zilla::Pragmas;
7 17     17   89796  
  17         47  
  17         124  
8             use namespace::autoclean;
9 17     17   145  
  17         60  
  17         143  
10             requires 'dir';
11              
12             my ($self) = @_;
13              
14 56     56 0 157 my $dir = $self->dir;
15             my $files = [
16 56         1973 grep { index($_->name, "$dir/") == 0 }
17             @{ $self->zilla->files }
18 458         1184 ];
19 56         144 }
  56         1616  
20              
21             1;
22              
23              
24             =pod
25              
26             =encoding UTF-8
27              
28             =head1 NAME
29              
30             Dist::Zilla::Role::ExecFiles - something that finds files to install as executables
31              
32             =head1 VERSION
33              
34             version 6.028
35              
36             =head1 PERL VERSION
37              
38             This module should work on any version of perl still receiving updates from
39             the Perl 5 Porters. This means it should work on any version of perl released
40             in the last two to three years. (That is, if the most recently released
41             version is v5.40, then this module should work on both v5.40 and v5.38.)
42              
43             Although it may work on older versions of perl, no guarantee is made that the
44             minimum required version will not be increased. The version may be increased
45             for any reason, and there is no promise that patches will be accepted to lower
46             the minimum required perl.
47              
48             =head1 AUTHOR
49              
50             Ricardo SIGNES 😏 <cpan@semiotic.systems>
51              
52             =head1 COPYRIGHT AND LICENSE
53              
54             This software is copyright (c) 2022 by Ricardo SIGNES.
55              
56             This is free software; you can redistribute it and/or modify it under
57             the same terms as the Perl 5 programming language system itself.
58              
59             =cut