File Coverage

blib/lib/Acme/CPANModules/DiffWrappers.pm
Criterion Covered Total %
statement 6 6 100.0
branch 4 4 100.0
condition n/a
subroutine 2 2 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package Acme::CPANModules::DiffWrappers;
2              
3 1     1   370992 use strict;
  1         2  
  1         229  
4              
5             our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
6             our $DATE = '2023-10-29'; # DATE
7             our $DIST = 'Acme-CPANModules-DiffWrappers'; # DIST
8             our $VERSION = '0.004'; # VERSION
9              
10             require Acme::CPANModules::CLI::Wrapper::UnixCommand;
11             my $srclist = $Acme::CPANModules::CLI::Wrapper::UnixCommand::LIST;
12              
13             sub _includes {
14 13     13   17 my ($list, $item) = @_;
15 13 100       22 ref $list eq 'ARRAY' ? ((grep {$_ eq $item} @$list) ? 1:0) : ($list eq $item);
  5 100       10  
16             }
17              
18             our $LIST = {
19             summary => "List of wrappers for the diff Unix command",
20             entries => [
21             grep { _includes($_->{'x.command'}, 'diff') } @{ $srclist->{entries} }
22             ],
23             };
24              
25             1;
26             # ABSTRACT: List of wrappers for the diff Unix command
27              
28             __END__