| 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
| |||||||||||
| 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
| |||||||||||
| 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; | |||||||||