| 1 | # Copyright 2011-2012 Yuki Izumi. ( anneli AT cpan DOT org ) | ||||||||||||
| 2 | # This is free software; you can redistribute it and/or modify it under the | ||||||||||||
| 3 | # same terms as Perl itself. | ||||||||||||
| 4 | |||||||||||||
| 5 | package Erlang::Parser::Node::VariableRecordUpdate; | ||||||||||||
| 6 | |||||||||||||
| 7 | 4 | ▶ | use Moose; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | 4 | with 'Erlang::Parser::Node'; | |||||||||||
| 9 | |||||||||||||
| 10 | 4 | has 'variable' => (is => 'rw', required => 1, isa => 'Erlang::Parser::Node::Variable'); | |||||||||||
| 11 | 4 | has 'update' => (is => 'rw', required => 1, isa => 'Erlang::Parser::Node::RecordNew'); | |||||||||||
| 12 | |||||||||||||
| 13 | sub print { | ||||||||||||
| 14 | 188 | ▶ | my ($self, $fh, $depth) = @_; | ||||||||||
|
Subroutine
print: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||
| 15 | 188 | ▶ | $depth ||= 0; | ||||||||||
|
Condition100%2/2
$depth ||= 0
MC/DC100%1/1
$depth ||= 0
$depth
Truth table100%2/2
A
A= $depth
| |||||||||||||
| 16 | |||||||||||||
| 17 | 188 | $self->variable->print($fh, $depth); | |||||||||||
| 18 | 188 | $self->update->print($fh, $depth); | |||||||||||
| 19 | } | ||||||||||||
| 20 | |||||||||||||
| 21 | 4 | __PACKAGE__->meta->make_immutable; | |||||||||||
| 22 | |||||||||||||
| 23 | =head1 NAME | ||||||||||||
| 24 | |||||||||||||
| 25 | Erlang::Parser::Node::VariableRecordUpdate - variable record update | ||||||||||||
| 26 | |||||||||||||
| 27 | =head1 DESCRIPTION | ||||||||||||
| 28 | |||||||||||||
| 29 | An update of a variable record's component. | ||||||||||||
| 30 | |||||||||||||
| 31 | =head2 Accessors | ||||||||||||
| 32 | |||||||||||||
| 33 | =over 4 | ||||||||||||
| 34 | |||||||||||||
| 35 | =item C<variable> | ||||||||||||
| 36 | |||||||||||||
| 37 | The L<Erlang::Parser::Node::Variable> which is being updated. | ||||||||||||
| 38 | |||||||||||||
| 39 | =item C<record> | ||||||||||||
| 40 | |||||||||||||
| 41 | An L<Erlang::Parser::Node::RecordNew> which updates parts of the record. | ||||||||||||
| 42 | |||||||||||||
| 43 | =back | ||||||||||||
| 44 | |||||||||||||
| 45 | =head2 Methods | ||||||||||||
| 46 | |||||||||||||
| 47 | =over 4 | ||||||||||||
| 48 | |||||||||||||
| 49 | =item C<print> | ||||||||||||
| 50 | |||||||||||||
| 51 | Pretty-prints the node to its filehandle argument. | ||||||||||||
| 52 | |||||||||||||
| 53 | =back | ||||||||||||
| 54 | |||||||||||||
| 55 | =head1 EXAMPLE | ||||||||||||
| 56 | |||||||||||||
| 57 | MyVar#state{part=42} | ||||||||||||
| 58 | |||||||||||||
| 59 | =cut | ||||||||||||
| 60 | |||||||||||||
| 61 | 4 | 1; | |||||||||||
| 62 | |||||||||||||
| 63 | # vim: set sw=4 ts=4: | ||||||||||||