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 11     11   66 use strict;
  11         21  
  11         285  
4 11     11   45 use warnings;
  11         23  
  11         242  
5              
6 11     11   45 use parent 'PLS::Parser::Element';
  11         13  
  11         44  
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;