blib/lib/Text/Nunjucks/Nodes/NodeList.pm

filter: Statementstmt 77.2% 17 / 22 Branchbran n/a Conditioncond 50.0% 2 / 4 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 75.0% 6 / 8 Podpod 0.0% 0 / 6 totaltotal 61.9% 26 / 42 CC 3 SCAR 4.9
CC
3
Cov
73%
BUILDARGS
2.5
BUILDARGS
2.5
add_child
1.1
CRAP 1.6
« blib/lib/Text/Nunjucks/Context/Gone.pm ↑ Summary blib/lib/Text/Nunjucks/Parser.pm »
1 package Text::Nunjucks::Nodes::NodeList;
2 # ABSTRACT: AST node holding a list of child nodes (nodes.js class NodeList)
3  
4 20 our $VERSION = '0.001';
5  
6 20 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 20 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 20 extends 'Text::Nunjucks::Nodes::Node';
10  
11 # upstream: class NodeList extends Node
12  
13 20 has children => ( is => 'rw' );
14  
15 7419 ▶sub typename { 'NodeList' }
Subroutine typename: called CC=1 SCAR=0.0
Pod undocumented
16 77621 ▶sub fields { ['children'] }
Subroutine fields: called CC=1 SCAR=0.0
Pod undocumented
17  
18 # init(lineno, colno, nodes) -> super.init(lineno, colno, nodes || [])
19 77406 ▶sub BUILDARGS {
Subroutine BUILDARGS: called CC=2 SCAR=9.2
Pod undocumented
20 0 ▶ my ( $class, $lineno, $colno, $nodes ) = @_;
Subroutine BUILDARGS: not called CC=2 SCAR=9.2
Pod undocumented
21 0 ▶ return $class->_field_args( $lineno, $colno, $nodes || [] );
Condition50%2/4
$nodes || []
l!l
5581221594
$nodes || []
l!l
00
MC/DC100%1/1
$nodes || []
$nodes
MC/DC0%0/1
$nodes || []
$nodes
Truth table100%2/2
A
A= $nodes
Aresult
11
00
Truth table0%0/2
A
A= $nodes
Aresult
11
00
22 }
23  
24 18774 ▶sub add_child {
Subroutine add_child: called CC=1 SCAR=1.2
Pod undocumented
25 0 ▶ my ( $self, $node ) = @_;
Subroutine add_child: not called CC=1 SCAR=1.2
Pod undocumented
26 0 push @{ $self->children }, $node;
27 }
28  
29 20 1;
30  
31 __END__
« blib/lib/Text/Nunjucks/Context/Gone.pm ↑ Summary blib/lib/Text/Nunjucks/Parser.pm »