File Coverage

blib/lib/PJVM/Class/Attribute/SourceFile.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 19 20 95.0


line stmt bran cond sub pod time code
1             package PJVM::Class::Attribute::SourceFile;
2              
3 3     3   17 use strict;
  3         6  
  3         115  
4 3     3   18 use warnings;
  3         7  
  3         103  
5              
6 3         20 use Object::Tiny qw(
7             sourcefile_index
8 3     3   18 );
  3         5  
9              
10             sub new_from_io {
11 3     3 0 7 my ($pkg, $io, $cp) = @_;
12            
13 3         72 my $buff;
14            
15 3         7 read $io, $buff, 2;
16 3         9 my $sourcefile_index = unpack("n", $buff);
17            
18 3         23 my $self = $pkg->new(
19             sourcefile_index => $sourcefile_index,
20             );
21            
22 3         32 return $self;
23             }
24              
25             1;
26             __END__