Net/OBEX/Response/Connect.pm

filter: Statementstmt 100% 22 / 22 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 96.6% 29 / 30 CC 2 SCAR 2.9
CC
2
Cov
96%
parse_info
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Net/OBEX/Response/Generic.pm ↑ Summary Net/OBEX/Packet/Headers/Byte1.pm »
1 package Net::OBEX::Response::Connect;
2  
3 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 7 our $VERSION = '1.001002'; # VERSION
7  
8 7 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 7 ▶use base 'Net::OBEX::Response::Generic';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 ▶sub parse_info {
Subroutine parse_info: called CC=2 SCAR=7.0
Pod documented
12 2 my ( $self, $packet ) = @_;
13 2 ▶ $packet = $self->packet
Branch: 1 branch
BranchTrueFalseTotal
unless defined $packet 0 2 2
14 unless defined $packet;
15  
16 2 my %info;
17 2 @info{ qw(
18 response_code packet_length obex_version flags mtu
19 )
20 } = unpack 'a n B8 B8 n', $packet;
21  
22 @info{qw( response_code response_code_meaning ) } =
23 2 $self->code_meaning( $info{response_code} );
24  
25 2 $info{headers_length} = $info{packet_length} - 7;
26 2 $self->headers_length( $info{headers_length} );
27  
28 2 return $self->info( \%info );
29 }
30  
31 7 1;
32  
33 __END__
« Net/OBEX/Response/Generic.pm ↑ Summary Net/OBEX/Packet/Headers/Byte1.pm »