Schematron.pm

filter: Statementstmt 68.5% 24 / 35 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 6 / 9 Podpod 0.0% 0 / 2 totaltotal 62.5% 30 / 48 CC 3 SCAR 10.7
CC
3
Cov
65%
add_test
6.0
add_tests
6.0
__ANON__
2.0
CRAP 2.9
« Schematron/Test.pm ↑ Summary Schematron/Schema.pm »
1 package XML::Schematron;
2 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 with 'MooseX::Traits';
5
6 1 ▶use Moose::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use XML::Schematron::Test;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Check::ISA;
Subroutine BEGIN: called CC=1 SCAR=0.0
9
10 1 ▶use vars qw/$VERSION/;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 $VERSION = '1.12';
12
13
14 1 has '+_trait_namespace' => ( default => 'XML::Schematron' );
15
16
17 has tests => (
18 traits => ['Array'],
19 is => 'rw',
20 isa => 'ArrayRef[XML::Schematron::Test]',
21 0 ▶ default => sub { [] },
Subroutine __ANON__: not called CC=1 SCAR=6.9
22 1 handles => {
23 _add_test => 'push',
24 all_tests => 'elements',
25 }
26 );
27
28
29 0 ▶sub add_test {
Subroutine add_test: not called CC=2 SCAR=17.9
Pod undocumented
30 0 my $self = shift;
31 0 my $ref = shift;
32
33 0 ▶ if ( obj($ref, 'XML::Schematron::Test') ) {
Branch: 1 branch
BranchTrueFalseTotal
if (&obj($ref, 'XML::Schematron::Test')) { } 0 0 0
34 0 $self->_add_test( $ref );
35 }
36 else {
37 0 $self->_add_test( XML::Schematron::Test->new( %{$ref} ) );
38 }
39 }
40
41 0 ▶sub add_tests {
Subroutine add_tests: not called CC=2 SCAR=17.9
Pod undocumented
42 0 my $self = shift;
43 0 my @tests = @_;
44 0 foreach my $test (@tests) {
45 0 $self->add_test( $test );
46 }
47 }
48
49 1 __PACKAGE__->meta->make_immutable;
50
51 1 1;
52
53 __END__
« Schematron/Test.pm ↑ Summary Schematron/Schema.pm »