blib/lib/Cikl/Smrt/ParserHelpers/XPathRegexMapping.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 28 CC 2 SCAR 12.0
CC
2
Cov
0%
BUILD
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.3
1 package Cikl::Smrt::ParserHelpers::XPathRegexMapping;
2  
3 use strict;
4 use warnings;
5 use Mouse;
6 use Mouse::Util::TypeConstraints;
7  
8  
9 has 'event_fields' => (
10 is => 'ro',
11 isa => 'ArrayRef[Str]',
12 required => 1
13 );
14  
15 has 'xpath' => (
16 is => 'ro',
17 isa => 'Str',
18 required => 1
19 );
20  
21 has 'regex' => (
22 is => 'ro',
23 isa => 'RegexpRef',
24 required => 1
25 );
26  
27 sub BUILD {
28 my $self = shift;
29  
30 if ( $#{$self->event_fields} == -1 ) {
31 die 'event_fields: at least one field name required!';
32 }
33 }
34  
35 __PACKAGE__->meta->make_immutable;
36  
37 1;
38  
39