File Coverage

blib/lib/PLS/Parser/Element/VariableStatement.pm
Criterion Covered Total %
statement 12 20 60.0
branch n/a
condition n/a
subroutine 4 6 66.6
pod 0 2 0.0
total 16 28 57.1


line stmt bran cond sub pod time code
1             package PLS::Parser::Element::VariableStatement;
2              
3 11     11   67 use strict;
  11         21  
  11         283  
4 11     11   45 use warnings;
  11         20  
  11         472  
5              
6 11     11   54 use parent 'PLS::Parser::Element';
  11         22  
  11         46  
7              
8 11     11   4699 use PLS::Parser::Element::Variable;
  11         33  
  11         1507  
9              
10             =head1 NAME
11              
12             PLS::Parser::Element::Variable
13              
14             =head1 DESCRIPTION
15              
16             Subclass of L<PLS::Parser::Element> representing a variable statement.
17              
18             =cut
19              
20             sub new
21             {
22 0     0 0   my ($class, @args) = @_;
23              
24 0           my $self = $class->SUPER::new(@args);
25             $self->{symbols} = [
26 0           map { PLS::Parser::Element::Variable->new(document => $self->{document}, element => $_, file => $self->{file}) }
27 0           grep { ref $_ eq 'PPI::Token::Symbol' } $self->element->symbols
  0            
28             ];
29              
30 0           return $self;
31             } ## end sub new
32              
33             sub symbols
34             {
35 0     0 0   my ($self) = @_;
36              
37 0           return $self->{symbols};
38             }
39              
40             1;