Jacquard/Actor/Role/Tree/TreeDAGNode.pm

filter: Statementstmt 69.5% 16 / 23 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 100% 1 / 1 totaltotal 65.6% 21 / 32 CC 2 SCAR 9.4
CC
2
Cov
64%
parent
6.0
__ANON__
2.0
BEGIN
1.0
CRAP 2.6
« Jacquard/Actor/Role/Tree/TreeDAGNode/WithChildren.pm ↑ Summary Jacquard.pm »
1 1 ▶use Renard::Incunabula::Common::Setup;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 package Intertangle::Jacquard::Actor::Role::Tree::TreeDAGNode;
3 # ABSTRACT: Store in Tree::DAG_Node
4 1 $Intertangle::Jacquard::Actor::Role::Tree::TreeDAGNode::VERSION = '0.001';
5 1 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use Renard::Incunabula::Common::Types qw(InstanceOf);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Tree::DAG_Node;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 0 ▶has _tree_dag_node => (
Subroutine __ANON__: not called CC=1 SCAR=6.9
11 is => 'ro',
12 isa => InstanceOf['Tree::DAG_Node'],
13 0 default => method() {
14 0 Tree::DAG_Node->new({ attributes => { actor => $self } })
15 1 },
16 );
17  
18  
19 0 ▶method parent() {
Subroutine parent: not called CC=2 SCAR=17.9
Pod documented
20 0 my $parent_dag = $self->_tree_dag_node->mother;
21 return defined $parent_dag
22 ? $parent_dag->attributes->{actor}
23 0 ▶ : undef;
Branch: 1 branch
BranchTrueFalseTotal
defined $parent_dag ? : 0 0 0
24 1 }
25  
26 1 1;
27  
28 __END__
29  
30 =pod
31  
32 =encoding UTF-8
33  
34 =head1 NAME
35  
36 Intertangle::Jacquard::Actor::Role::Tree::TreeDAGNode - Store in Tree::DAG_Node
37  
38 =head1 VERSION
39  
40 version 0.001
41  
42 =head1 ATTRIBUTES
43  
44 =head2 _tree_dag_node
45  
46 Use delegation to C<Tree::DAG_Node> to build scene graph.
47  
48 =head1 METHODS
49  
50 =head2 parent
51  
52 Returns the parent of this actor.
53  
54 =head1 AUTHOR
55  
56 Zakariyya Mughal <zmughal@cpan.org>
57  
58 =head1 COPYRIGHT AND LICENSE
59  
60 This software is copyright (c) 2017 by Zakariyya Mughal.
61  
62 This is free software; you can redistribute it and/or modify it under
63 the same terms as the Perl 5 programming language system itself.
64  
65 =cut
« Jacquard/Actor/Role/Tree/TreeDAGNode/WithChildren.pm ↑ Summary Jacquard.pm »