Finnigan/OLE2Property.pm

filter: Statementstmt 94.2% 33 / 35 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 13 / 13 Podpod 100% 8 / 8 totaltotal 94.8% 55 / 58 CC 2 SCAR 1.4
CC
2
Cov
92%
decode
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« Finnigan/ProfileChunk.pm ↑ Summary Finnigan/InstrumentLogRecord.pm »
1 package Finnigan::OLE2Property;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings FATAL => qw( all );
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 our $VERSION = 0.0206;
6  
7 2 ▶use Finnigan;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use base 'Finnigan::Decoder';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 ▶use overload ('""' => 'name');
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 5 ▶sub decode {
Subroutine decode: called CC=2 SCAR=7.2
Pod documented
13 5 my ($class, $stream, $param) = @_;
14 5 my ($bb_log, $charset) = @$param;
15  
16 # do a null read to initialize internal variables
17 5 my $self = Finnigan::Decoder->read($stream, []);
18 5 bless $self, $class;
19  
20 5 my $fields = [
21 "name" => ['string', 'UTF-16-LE:64'],
22 "namelen" => ['v', 'UInt16'],
23 "type" => ['c', 'UInt8'],
24 "decorator" => ['c', 'UInt8'],
25 "left" => ['V', 'UInt32'],
26 "right" => ['V', 'UInt32'],
27 "child" => ['V', 'UInt32'], # child node (valid for storage and root types)
28 "clsid" => ['a16', 'RawBytes'], # CLSID of this storage (valid for storage and root types)
29 "flags" => ['a4', 'RawBytes'], # user flags
30 "create time" => ['windows_time', 'TimestampWin64'],
31 "mod time" => ['windows_time', 'TimestampWin64'],
32 "start" => ['V', 'UInt32'], # starting index of the stream (valid for stream and root types)
33 ];
34  
35 5 ▶ if ( $bb_log == 9 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($bb_log == 9) { } 5 0 5
36 5 push @$fields, (
37 "data size" => ['V', 'UInt32'], # size in bytes (valid for stream and root types)
38 "padding" => ['a4', 'RawBytes'],
39 );
40 }
41 else {
42 0 die "small block streams and Uint64 stream size are not implemented";
43 0 push @$fields, (
44 "data size" => ['*', 'UInt64'], # size in bytes (valid for stream and root types)
45 );
46 }
47  
48 5 $self->SUPER::decode($stream, $fields);
49  
50 5 return $self;
51 }
52  
53 7 ▶sub name {
Subroutine name: called CC=1 SCAR=0.0
Pod documented
54 7 shift->{data}->{name}->{value};
55 }
56  
57 5 ▶sub data_size {
Subroutine data_size: called CC=1 SCAR=0.0
Pod documented
58 5 shift->{data}->{"data size"}->{value};
59 }
60  
61 19 ▶sub child {
Subroutine child: called CC=1 SCAR=0.0
Pod documented
62 19 shift->{data}->{child}->{value};
63 }
64  
65 14 ▶sub left {
Subroutine left: called CC=1 SCAR=0.0
Pod documented
66 14 shift->{data}->{left}->{value};
67 }
68  
69 14 ▶sub right {
Subroutine right: called CC=1 SCAR=0.0
Pod documented
70 14 shift->{data}->{right}->{value};
71 }
72  
73 5 ▶sub start {
Subroutine start: called CC=1 SCAR=0.0
Pod documented
74 5 shift->{data}->{start}->{value};
75 }
76  
77 5 ▶sub type {
Subroutine type: called CC=1 SCAR=0.0
Pod documented
78 5 shift->{data}->{type}->{value};
79 }
80  
81 2 1;
82 __END__
« Finnigan/ProfileChunk.pm ↑ Summary Finnigan/InstrumentLogRecord.pm »