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 13     13   111 use strict;
  13         35  
  13         647  
4 13     13   83 use warnings;
  13         25  
  13         758  
5              
6 13     13   103 use parent 'PLS::Parser::Element';
  13         35  
  13         89  
7              
8 13     13   8633 use PLS::Parser::Element::Variable;
  13         59  
  13         6972  
9              
10             =head1 NAME
11              
12             PLS::Parser::Element::VariableStatement
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;