blib/lib/Zuzu/AST/Stmt/Import.pm

filter: Statementstmt 88.2% 15 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 100% 1 / 1 totaltotal 82.6% 19 / 23 CC 1 SCAR 0.5
CC
1
Cov
88%
__ANON__
1.1
__ANON__
1.1
BEGIN
1.0
CRAP 1.1
« blib/lib/Zuzu/AST/Stmt/Method.pm ↑ Summary blib/lib/Zuzu/AST/Stmt/Let.pm »
1 package Zuzu::AST::Stmt::Import;
2  
3 78 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 78 our $VERSION = '0.007002';
6  
7 78 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 78 has 'module' => ( is => 'rw' );
10 78 has 'items' => ( is => 'rw' ); # items: [ {name=>, alias=>} ] or [ {star=>1} ]
11 0 ▶has 'try_mode' => ( is => 'rw', default => sub { 0 } );
Subroutine __ANON__: not called CC=1 SCAR=1.2
12 78 has 'condition_expr' => ( is => 'rw' );
13 0 ▶has 'condition_positive' => ( is => 'rw', default => sub { 1 } );
Subroutine __ANON__: not called CC=1 SCAR=1.2
14  
15 78 with 'Zuzu::AST::Role::Node';
16  
17 2308 ▶sub evaluate { $_[1]->eval_import($_[0]) }
Subroutine evaluate: called CC=1 SCAR=0.0
Pod documented
18  
19 =pod
20  
21 =head1 NAME
22  
23 Zuzu::AST::Stmt::Import - AST node for import statements
24  
25 =head1 DESCRIPTION
26  
27 Represents one statement form in the abstract syntax tree and delegates execution to C<Zuzu::Runtime>.
28  
29 =head1 INHERITANCE
30  
31 Inherits from C<Moo::Object>.
32  
33 =head1 ROLES
34  
35 Consumes C<Zuzu::AST::Role::Node>.
36  
37 =head1 ATTRIBUTES
38  
39 =head2 module
40  
41 Type: B<Any>.
42  
43 Value stored in the C<module> attribute.
44  
45 =head2 items
46  
47 Type: B<ArrayRef>.
48  
49 Ordered array elements (expressions or runtime values).
50  
51 =head1 METHODS
52  
53 =head2 evaluate
54  
55 Dispatches this AST node to the matching runtime evaluator.
56  
57 =head1 SEE ALSO
58  
59 C<Zuzu::AST::Role::Node>.
60  
61 Subclasses: none in this distribution.
62  
63 =head1 COPYRIGHT AND LICENCE
64  
65 B<< Zuzu::AST::Stmt::Import >> is copyright Toby Inkster.
66  
67 It is free software; you may redistribute it and/or modify it under
68 the terms of either the Artistic License 1.0 or the GNU General Public
69 License version 2.
70  
71 =cut
72  
73 78 1;
« blib/lib/Zuzu/AST/Stmt/Method.pm ↑ Summary blib/lib/Zuzu/AST/Stmt/Let.pm »