Fast/GraphPM.pm

filter: Statementstmt 75.0% 21 / 28 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 44.4% 4 / 9 Podpod 50.0% 1 / 2 totaltotal 65.8% 27 / 41 CC 1 SCAR 4.4
CC
1
Cov
73%
noop
2.0
add_edge
2.0
__ANON__
2.0
CRAP 1.6
« Fast.pm ↑ Summary
1 package Graph::Fast::GraphPM;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use base 'Graph::Fast';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 0 ▶sub noop { 1; }
Subroutine noop: not called CC=1 SCAR=6.9
Pod undocumented
8  
9 1 *add_weighted_edge = \&Graph::Fast::add_edge;
10  
11 0 ▶sub add_edge {
Subroutine add_edge: not called CC=1 SCAR=6.9
Pod documented
12 0 Graph::Fast::add_edge($_[0], $_[1], $_[2], 1);
13 }
14  
15 1 *SP_Dijkstra = \&Graph::Fast::dijkstra;
16  
17 1 *SPT_Dijkstra_clear_cache =
18 *SPT_Bellman_Ford_clear_cache =
19 \&noop;
20  
21 1 1;
22  
23 package Graph::Fast_LPQ::GraphPM;
24  
25 1 ▶use base 'Graph::Fast::GraphPM';
Subroutine BEGIN: called CC=1 SCAR=0.0
26  
27 0 ▶sub has_lpq { Graph::Fast::GraphPM->new(queue_maker => sub { List::PriorityQueue->new() }); }
Subroutine __ANON__: not called CC=1 SCAR=6.9
Subroutine has_lpq: not called CC=1 SCAR=6.9
28  
29 0 ▶sub no_lpq { print STDERR "Creating Graph::Fast_LPQ::GraphPM with Hash::PriorityQueue because List::PriorityQueue isn't installed.\n";
Subroutine no_lpq: not called CC=1 SCAR=6.9
30 0 Graph::Fast::GraphPM->new(); }
31  
32 1 eval { require List::PriorityQueue };
33 1 ▶if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) { } 0 1 1
34 0 *new = \&no_lpq;
35 } else {
36 1 *new = \&has_lpq;
37 }
38  
39 1 1;
40  
41  
42 __END__
« Fast.pm ↑ Summary