OPCS4/Graph.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 19 / 19 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« OPCS4/Parser.pm ↑ Summary OPCS4/Term.pm »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Medical::OPCS4::Graph;
5 # ABSTRACT: A directed graph class.
6  
7 1 ▶use Graph::Directed;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 =head1 NAME
10  
11 Medical::OPCS4::Graph - OPCS4 Graph object
12  
13 =head1 METHODS
14  
15 =head2 new
16  
17 Creates a new graph object with a single edge, the root.
18
19 Do not use this module directly, this is for the sole purpose
20 of manipulating the internal graph that stores the ontology.
21  
22 =cut
23  
24 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
25 1 my $self = Graph::Directed->new();
26 1 $self->add_vertex( 'root' );
27 1 $self->set_vertex_attribute('root', 'description', 'This is the root node.' );
28
29 1 return $self;
30 }
31  
32 1 1;
« OPCS4/Parser.pm ↑ Summary OPCS4/Term.pm »