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

filter: Statementstmt 90.4% 19 / 21 Branchbran n/a Conditioncond 33.3% 2 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 4 totaltotal 64.2% 27 / 42 CC 3 SCAR 6.0
CC
3
Cov
78%
BUILDARGS
2.9
BUILDARGS
2.9
BEGIN
1.0
CRAP 1.8
« blib/lib/Text/Nunjucks/Lib/Error.pm ↑ Summary blib/lib/Text/Nunjucks/Loader/Precompiled.pm »
1 package Text::Nunjucks::Nodes::FromImport;
2 # ABSTRACT: AST node FromImport (fields template, names, withContext), ported from nodes.js
3  
4 20 our $VERSION = '0.001';
5  
6 20 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 20 ▶use Text::Nunjucks::Nodes::NodeList;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 20 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 20 extends 'Text::Nunjucks::Nodes::Node';
11  
12 # upstream: class FromImport extends Node -- custom init, declared in nodes.js
13 # between Import and FunCall.
14  
15 20 has template => ( is => 'rw' );
16 20 has names => ( is => 'rw' );
17 20 has withContext => ( is => 'rw' );
18  
19 447 ▶sub typename { 'FromImport' }
Subroutine typename: called CC=1 SCAR=0.0
Pod undocumented
20 2189 ▶sub fields { [ 'template', 'names', 'withContext' ] }
Subroutine fields: called CC=1 SCAR=0.0
Pod undocumented
21  
22 # init(lineno, colno, template, names, withContext)
23 # -> super.init(lineno, colno, template, names || new NodeList(), withContext)
24 446 ▶sub BUILDARGS {
Subroutine BUILDARGS: called CC=2 SCAR=10.5
Pod undocumented
25 0 ▶ my ( $class, $lineno, $colno, $template, $names, $withContext ) = @_;
Subroutine BUILDARGS: not called CC=2 SCAR=10.5
Pod undocumented
26 0 ▶ return $class->_field_args(
Condition33%2/6
$names || $class->_node_class('NodeList')->new
l!l&&r!l&&!r
44510
$names || $class->_node_class('NodeList')->new
l!l&&r!l&&!r
000
MC/DC0%0/2
$names || $class->_node_class('NodeList')->new
$names $class->_node_class('NodeList')->new
MC/DC0%0/2
$names || $class->_node_class('NodeList')->new
$names $class->_node_class('NodeList')->new
Truth table66%2/3
A || B
A= $namesB= $class->_node_class('NodeList')->new
ABresult
1X1
011
000
Truth table0%0/3
A || B
A= $namesB= $class->_node_class('NodeList')->new
ABresult
1X1
011
000
27 $lineno, $colno,
28 $template,
29 ( $names || $class->_node_class('NodeList')->new ),
30 $withContext
31 );
32 }
33  
34 20 1;
35  
36 __END__
« blib/lib/Text/Nunjucks/Lib/Error.pm ↑ Summary blib/lib/Text/Nunjucks/Loader/Precompiled.pm »