File Coverage

blib/lib/Parse/Java/TypeDecl.pm
Criterion Covered Total %
statement 16 16 100.0
branch 1 2 50.0
condition 1 3 33.3
subroutine 5 5 100.0
pod 1 1 100.0
total 24 27 88.8


line stmt bran cond sub pod time code
1             package Parse::Java::TypeDecl;
2              
3 6     6   33 use strict;
  6         9  
  6         187  
4 6     6   82 use warnings;
  6         11  
  6         143  
5              
6 6     6   28 use Carp qw(croak);
  6         11  
  6         429  
7              
8 6     6   26 use base qw(Parse::Java::Element);
  6         17  
  6         4011  
9              
10             __PACKAGE__->mk_accessors(qw(name modifiers));
11              
12             sub new {
13 4     4 1 8 my $pkg = shift;
14 4         25 my $self = $pkg->SUPER::new(@_);
15              
16             # Default values
17 4 50 33     56 $self->modifiers([]) if !$self->modifiers || ref $self->modifiers ne 'ARRAY';
18              
19 4         131 return $self;
20             }
21             1;
22             __END__