PJVM/Class/Attribute/LineNumberTable.pm

filter: Statementstmt 100% 20 / 20 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 96.3% 26 / 27 CC 2 SCAR 3.4
CC
2
Cov
100%
new_from_io
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« PJVM/Class/Field.pm ↑ Summary PJVM/Types.pm »
1 package PJVM::Class::Attribute::LineNumberTable;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 ▶use Object::Tiny qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
7 line_number_table
8 3 );
9  
10 9 ▶sub new_from_io {
Subroutine new_from_io: called CC=2 SCAR=6.9
Pod undocumented
11 9 my ($pkg, $io, $cp) = @_;
12
13 9 my $buff;
14
15 9 read $io, $buff, 2;
16 9 my $line_number_table_length = unpack("n", $buff);
17
18 9 my @line_number_table;
19 9 ▶ while ($line_number_table_length--) {
Branch: 1 branch
BranchTrueFalseTotal
if ($line_number_table_length--) 12 9 21
20 12 read $io, $buff, 4;
21 12 push @line_number_table, [unpack("n*", $buff)];
22 }
23
24 9 my $self = $pkg->new(
25 line_number_table => \@line_number_table,
26 );
27
28 9 return $self;
29 }
30  
31 3 1;
32 __END__
« PJVM/Class/Field.pm ↑ Summary PJVM/Types.pm »