blib/lib/XML/Pastor/Schema/Element.pm

filter: Statementstmt 91.6% 22 / 24 Branchbran 50.0% 3 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 86.4% 32 / 37 CC 4 SCAR 10.5
CC
4
Cov
83%
isSingleton
5.2
BEGIN
1.0
BEGIN
1.0
CRAP 2.8
« blib/lib/XML/Pastor/Schema/Group.pm ↑ Summary blib/lib/XML/Pastor.pm »
1 10 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 10 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 10 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 10 ▶no warnings qw(uninitialized);
Subroutine BEGIN: called CC=1 SCAR=0.0
5
6
7 #===================================================
8 package XML::Pastor::Schema::Element;
9
10 10 ▶use XML::Pastor::Schema::Object;
Subroutine BEGIN: called CC=1 SCAR=0.0
11
12 10 our @ISA = qw(XML::Pastor::Schema::Object);
13
14 10 XML::Pastor::Schema::Element->mk_accessors(qw(baseClasses minOccurs maxOccurs targetNamespace));
15
16
17 127 ▶sub isSingleton {
Subroutine isSingleton: called CC=4 SCAR=16.4
Pod documented
18 127 my $self = shift;
19
20 127 my $maxOccurs = $self->maxOccurs();
21
22 127 ▶ return 1 unless ($maxOccurs);
Branch: 1 branch
BranchTrueFalseTotal
unless $maxOccurs 97 30 127
23 30 ▶ return 0 if ($maxOccurs eq 'unbounded');
Branch: 1 branch
BranchTrueFalseTotal
if $maxOccurs eq "unbounded" 30 0 30
24 0 ▶ return 1 if ($maxOccurs == 1);
Branch: 1 branch
BranchTrueFalseTotal
if $maxOccurs == 1 0 0 0
25 0 return 0;
26 }
27
28 10 1;
29
30 __END__
« blib/lib/XML/Pastor/Schema/Group.pm ↑ Summary blib/lib/XML/Pastor.pm »