blib/lib/Zuzu/AST/Expr/DictGet.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 100% 1 / 1 totaltotal 100% 16 / 16 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
evaluate
1.0
CRAP 1.0
« blib/lib/Zuzu/AST/Expr/Dict.pm ↑ Summary blib/lib/Zuzu/AST/Expr/IncDec.pm »
1 package Zuzu::AST::Expr::DictGet;
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 'dict' => ( is => 'rw' );
10 78 has 'key' => ( is => 'rw' );
11  
12 78 with 'Zuzu::AST::Role::Node';
13  
14 9389 ▶sub evaluate { $_[1]->eval_dict_get($_[0]) }
Subroutine evaluate: called CC=1 SCAR=0.0
Pod documented
15  
16 =pod
17  
18 =head1 NAME
19  
20 Zuzu::AST::Expr::DictGet - AST node for dictget expressions
21  
22 =head1 DESCRIPTION
23  
24 Represents one expression form in the abstract syntax tree and delegates evaluation to C<Zuzu::Runtime>.
25  
26 =head1 INHERITANCE
27  
28 Inherits from C<Moo::Object>.
29  
30 =head1 ROLES
31  
32 Consumes C<Zuzu::AST::Role::Node>.
33  
34 =head1 ATTRIBUTES
35  
36 =head2 dict
37  
38 Type: B<Any>.
39  
40 Value stored in the C<dict> attribute.
41  
42 =head2 key
43  
44 Type: B<ConsumerOf["Zuzu::AST::Role::Node"]>.
45  
46 Expression that evaluates to a dictionary key.
47  
48 =head1 METHODS
49  
50 =head2 evaluate
51  
52 Dispatches this AST node to the matching runtime evaluator.
53  
54 =head1 SEE ALSO
55  
56 C<Zuzu::AST::Role::Node>.
57  
58 Subclasses: none in this distribution.
59  
60 =head1 COPYRIGHT AND LICENCE
61  
62 B<< Zuzu::AST::Expr::DictGet >> is copyright Toby Inkster.
63  
64 It is free software; you may redistribute it and/or modify it under
65 the terms of either the Artistic License 1.0 or the GNU General Public
66 License version 2.
67  
68 =cut
69  
70 78 1;
« blib/lib/Zuzu/AST/Expr/Dict.pm ↑ Summary blib/lib/Zuzu/AST/Expr/IncDec.pm »