Maker/Wheel.pm

filter: Statementstmt 100% 30 / 30 Branchbran 100% 2 / 2 Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 1 totaltotal 93.1% 41 / 44 CC 3 SCAR 4.7
CC
3
Cov
97%
init
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.6
« Maker/Hypercube.pm ↑ Summary Maker/SmallWorldBA.pm »
1 package Graph::Maker::Wheel;
2
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use Carp qw/croak/;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use base qw/Graph::Maker/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use Graph;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use Graph::Maker;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use Graph::Maker::Star;
Subroutine BEGIN: called CC=1 SCAR=0.0
10
11 2 our $VERSION = '0.01';
12
13 sub init
14 2 ▶{
Subroutine init: called CC=3 SCAR=11.0
Pod undocumented
15 2 my ($self, %params) = @_;
16
17 2 ▶ my $n = $params{N} || 0;
Condition50%1/2
$params{'N'} || 0
l!l
20
MC/DC0%0/1
$params{'N'} || 0
$params{'N'}
Truth table50%1/2
A
A= $params{'N'}
Aresult
11
00
18
19 2 my $g = new Graph::Maker('star', %params);
20
21 2 $g->add_cycle(2..$n);
22 2 ▶ $g->add_cycle(reverse 2..$n) unless $g->is_undirected();
Branch: 1 branch
BranchTrueFalseTotal
unless $g->is_undirected 1 1 2
23
24 2 return $g;
25 }
26
27 2 Graph::Maker->add_factory_type( 'wheel' => __PACKAGE__ );
28
29 2 1;
30
31 __DATA__
« Maker/Hypercube.pm ↑ Summary Maker/SmallWorldBA.pm »