Librarian/Library.pm

filter: Statementstmt 61.1% 11 / 18 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 1 / 1 totaltotal 57.1% 16 / 28 CC 4 SCAR 23.5
CC
4
Cov
50%
load
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 10.5
« Librarian.pm ↑ Summary
1 package JavaScript::Librarian::Library;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use base 'Algorithm::Dependency::Source';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use vars qw{$VERSION};
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 $VERSION = '1.00';
9 }
10  
11  
12  
13  
14  
15 #####################################################################
16 # Algorithm::Dependency::Source Methods
17  
18 # Overload ->load to add checking to make sure that all the ::Book
19 # object have a valid ->path.
20 0 ▶sub load {
Subroutine load: not called CC=4 SCAR=30.0
Pod documented
21 0 my $self = shift;
22 0 my $class = ref $self;
23  
24 # Call the normal method
25 0 ▶ $self->SUPER::load or return undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->SUPER::load or return undef 0 0 0
26  
27 # Check that all the items are Book objects
28 0 foreach my $Book ( $self->items ) {
29 0 ▶ next if UNIVERSAL::isa($Book, 'JavaScript::Librarian::Book');
Branch: 1 branch
BranchTrueFalseTotal
if UNIVERSAL::isa($Book, "JavaScript::Librarian::Book") 0 0 0
30 0 die "$class\::_load_item_list returned something that was not a JavaScript::Library::Book";
31 }
32  
33 0 1;
34 }
35  
36 1 1;
« Librarian.pm ↑ Summary