File Coverage

blib/lib/Data/AMF/Type/ByteArray.pm
Criterion Covered Total %
statement 12 13 92.3
branch 1 2 50.0
condition n/a
subroutine 4 4 100.0
pod 0 2 0.0
total 17 21 80.9


line stmt bran cond sub pod time code
1             package Data::AMF::Type::ByteArray;
2 2     2   680 use strict;
  2         7  
  2         82  
3 2     2   13 use warnings;
  2         5  
  2         286  
4              
5             sub new
6             {
7 4     4 0 8 my $class = shift;
8 4         23 my $self = bless { data => $_[0] }, $class;
9 4         25 return $self;
10             }
11              
12             sub data
13             {
14 1     1 0 2 my $self = shift;
15            
16 1 50       5 if(@_)
17             {
18 0         0 $self->{'data'} = $_[0];
19             }
20            
21 1         4 return $self->{'data'};
22             }
23              
24             1;
25              
26             __END__