File Coverage

blib/lib/PLS/Parser/Element/Package.pm
Criterion Covered Total %
statement 9 13 69.2
branch n/a
condition n/a
subroutine 3 5 60.0
pod 2 2 100.0
total 14 20 70.0


line stmt bran cond sub pod time code
1             package PLS::Parser::Element::Package;
2              
3 13     13   93 use strict;
  13         34  
  13         555  
4 13     13   93 use warnings;
  13         26  
  13         816  
5              
6 13     13   90 use parent 'PLS::Parser::Element';
  13         57  
  13         106  
7              
8             =head1 NAME
9              
10             PLS::Parser::Element::Package
11              
12             =head1 DESCRIPTION
13              
14             Subclass of L<PLS::Parser::Element> representing a package declaration.
15              
16             =cut
17              
18             sub name
19             {
20 0     0 1   my ($self) = @_;
21              
22 0           return $self->element->namespace;
23             }
24              
25             sub length
26             {
27 0     0 1   my ($self) = @_;
28              
29 0           return $self->SUPER::length() + (length 'package ') + (length ';');
30             }
31              
32             1;