Deserializer/Binary.pm

filter: Statementstmt 35.0% 7 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod 100% 1 / 1 totaltotal 41.6% 10 / 24 CC 1 SCAR 2.9
CC
1
Cov
35%
read_binary_handle_chunk
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Serializer/Date.pm ↑ Summary Serializer/String.pm »
1 package Hessian::Deserializer::Binary;
2  
3 32 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 #
6 32 ▶use feature "switch";
Subroutine BEGIN: called CC=1 SCAR=0.0
7 ##use Smart::Comments;
8  
9 0 ▶sub read_binary_handle_chunk { #{{{
Subroutine read_binary_handle_chunk: not called CC=1 SCAR=6.9
Pod documented
10 0 my ( $self, $first_bit ) = @_;
11 ### read_binary_handle_chunk
12 0 my $input_handle = $self->input_handle();
13 0 my ($data, $length );
14 0 given ($first_bit) {
15 0 when (/[\x42\x62]/) {
16 0 read $input_handle, $data, 2;
17 0 $length = unpack "n", $data;
18 }
19 0 when (/[\x20-\x2f]/) {
20 0 my $raw_octet = "\x00" . $first_bit;
21 0 $length = unpack 'n', $raw_octet;
22 0 $length -= 0x20;
23 }
24 }
25  
26  
27 0 my $binary = $self->read_from_inputhandle($length);
28 0 return $binary;
29 }
30  
31 32 "one, but we're not the same";
32  
33 __END__
« Serializer/Date.pm ↑ Summary Serializer/String.pm »