File Coverage

blib/lib/Data/MARC/Validator/Report/Plugin/Errors.pm
Criterion Covered Total %
statement 20 20 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 0 1 0.0
total 26 27 96.3


line stmt bran cond sub pod time code
1             package Data::MARC::Validator::Report::Plugin::Errors;
2              
3 8     8   171715 use strict;
  8         20  
  8         379  
4 8     8   42 use warnings;
  8         34  
  8         491  
5              
6 8     8   1835 use Mo qw(build default is);
  8         2475  
  8         86  
7 8     8   15805 use Mo::utils qw(check_required);
  8         78411  
  8         418  
8 8     8   4363 use Mo::utils::Array qw(check_array check_array_object);
  8         20534  
  8         1140  
9              
10             our $VERSION = 0.02;
11              
12             has errors => (
13             default => [],
14             is => 'ro',
15             );
16              
17             has filters => (
18             default => [],
19             is => 'ro',
20             );
21              
22             has record_id => (
23             is => 'ro',
24             );
25              
26             sub BUILD {
27 12     12 0 1418265 my $self = shift;
28              
29             # Check 'errors'.
30 12         67 check_array_object($self, 'errors', 'Data::MARC::Validator::Report::Error');
31              
32             # Check 'filters'.
33 11         321 check_array($self, 'filters');
34              
35             # Check 'record_id'.
36 10         112 check_required($self, 'record_id');
37             # TODO Check string.
38              
39 9         77 return;
40             }
41              
42             1;
43              
44             __END__