blib/lib/Metabase/Test/Fact.pm

filter: Statementstmt 94.7% 18 / 19 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 100% 3 / 3 totaltotal 90.3% 28 / 31 CC 2 SCAR 3.2
CC
2
Cov
90%
validate_content
2.0
content_metadata_types
2.0
BEGIN
1.0
CRAP 1.4
« blib/lib/Metabase/Test/Archive.pm ↑ Summary blib/lib/Metabase/Test/Index.pm »
1 2 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package Metabase::Test::Fact;
6 # ABSTRACT: Test class for Metabase testing
7 2 our $VERSION = '1.003'; # VERSION
8  
9 # Metabase::Fact is not a Moose class
10 2 ▶use parent 'Metabase::Fact::String';
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 8 ▶sub content_metadata {
Subroutine content_metadata: called CC=1 SCAR=0.0
Pod documented
13 8 my $self = shift;
14 return {
15 8 'size' => length $self->content,
16 'WIDTH' => length $self->content,
17 };
18 }
19  
20 0 ▶sub content_metadata_types {
Subroutine content_metadata_types: not called CC=1 SCAR=6.9
Pod documented
21 return {
22 0 'size' => "//num",
23 'WIDTH' => "//str",
24 };
25 }
26  
27 4 ▶sub validate_content {
Subroutine validate_content: called CC=2 SCAR=7.1
Pod documented
28 4 my $self = shift;
29 4 $self->SUPER::validate_content;
30 4 ▶ die __PACKAGE__ . " content length must be greater than zero\n"
Branch: 1 branch
BranchTrueFalseTotal
if length $self->content < 0 0 4 4
31 if length $self->content < 0;
32 }
33  
34 2 1;
35  
36 __END__
« blib/lib/Metabase/Test/Archive.pm ↑ Summary blib/lib/Metabase/Test/Index.pm »