File Coverage

blib/lib/PJVM/Class/Attribute/Exceptions.pm
Criterion Covered Total %
statement 9 17 52.9
branch n/a
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 12 22 54.5


line stmt bran cond sub pod time code
1             package PJVM::Class::Attribute::Exceptions;
2              
3 3     3   16 use strict;
  3         6  
  3         100  
4 3     3   15 use warnings;
  3         4  
  3         80  
5              
6 3         16 use Object::Tiny qw(
7             exceptions_index_table
8 3     3   15 );
  3         4  
9              
10             sub new_from_io {
11 0     0 0   my ($pkg, $io, $cp) = @_;
12            
13 0           my $buff;
14            
15             # Number of exceptions
16 0           read $io, $buff, 2;
17 0           my $number_of_exceptions = unpack("n", $buff);
18            
19 0           read $io, $buff, $number_of_exceptions * 2;
20 0           my @exceptions_index_table = unpack("n*", $buff);
21            
22 0           my $self = $pkg->new(
23             exceptions_index_table => \@exceptions_index_table,
24             );
25            
26 0           return $self;
27             }
28              
29             1;
30             __END__