File Coverage

blib/lib/Regex/Object/Matches.pm
Criterion Covered Total %
statement 37 37 100.0
branch n/a
condition n/a
subroutine 10 10 100.0
pod 0 3 0.0
total 47 50 94.0


line stmt bran cond sub pod time code
1             package Regex::Object::Matches;
2              
3 4     4   54 use 5.20.0;
  4         12  
4              
5 4     4   19 use utf8;
  4         6  
  4         23  
6 4     4   91 use English;
  4         5  
  4         23  
7 4     4   1546 use feature qw(signatures);
  4         7  
  4         381  
8              
9 4     4   21 use Moo;
  4         8  
  4         30  
10              
11 4     4   1470 no warnings qw(experimental::signatures);
  4         8  
  4         167  
12 4     4   22 use namespace::clean;
  4         8  
  4         23  
13              
14             has collection => (
15             is => 'ro',
16             required => 1,
17             );
18              
19             has count => (
20             is => 'rwp',
21             );
22              
23 5     5 0 1999 sub BUILD($self, $) {
  5         6  
  5         5  
24 5         6 $self->_set_count(scalar @{$self->collection});
  5         33  
25             }
26              
27 2     2 0 4 sub match_all($self) {
  2         2  
  2         3  
28 2         3 return [map { $_->match } @{$self->collection}];
  6         18  
  2         3  
29             }
30              
31 1     1 0 3 sub captures_all($self) {
  1         2  
  1         1  
32 1         3 return [map { $_->captures } @{$self->collection}];
  3         7  
  1         3  
33             }
34              
35             1;