| 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 || []
$nodes || []
MC/DC100%1/1
$nodes || []
$nodes
MC/DC0%0/1
$nodes || []
$nodes
Truth table100%2/2
A
A= $nodes
Truth table0%0/2
A
A= $nodes
| |||||||||||||||||||||||
| 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__ | ||||||||||||||||||||||