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   99 use 5.20.0;
  4         16  
4              
5 4     4   30 use utf8;
  4         8  
  4         30  
6 4     4   98 use English;
  4         9  
  4         27  
7 4     4   1770 use feature qw(signatures);
  4         9  
  4         433  
8              
9 4     4   28 use Moo;
  4         8  
  4         27  
10              
11 4     4   1804 no warnings qw(experimental::signatures);
  4         8  
  4         184  
12 4     4   25 use namespace::clean;
  4         8  
  4         31  
13              
14             has collection => (
15             is => 'ro',
16             required => 1,
17             );
18              
19             has count => (
20             is => 'rwp',
21             );
22              
23 5     5 0 1735 sub BUILD($self, $) {
  5         8  
  5         5  
24 5         10 $self->_set_count(scalar @{$self->collection});
  5         37  
25             }
26              
27 2     2 0 4 sub match_all($self) {
  2         4  
  2         3  
28 2         3 return [map { $_->match } @{$self->collection}];
  6         24  
  2         7  
29             }
30              
31 1     1 0 2 sub captures_all($self) {
  1         2  
  1         3  
32 1         3 return [map { $_->captures } @{$self->collection}];
  3         10  
  1         3  
33             }
34              
35             1;