File Coverage

blib/lib/Net/OSCAR/Callbacks/19/buddylist.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 14 14 100.0


line stmt bran cond sub pod time code
1             package Net::OSCAR::Callbacks;
2             BEGIN {
3 1     1   44 $Net::OSCAR::Callbacks::VERSION = '1.928';
4             }
5 1     1   12 use strict;
  1         5  
  1         42  
6 1     1   7 use warnings;
  1         3  
  1         75  
7 1     1   8 use vars qw($connection $snac $conntype $family $subtype $data $reqid $reqdata $session $protobit %data);
  1         4  
  1         854  
8             sub {
9              
10             $session->{blarray} ||= [];
11             substr($data{data}, 0, 3) = "";
12             substr($data{data}, -4, 4) = "" if $snac->{flags2};
13             push @{$session->{blarray}}, $data{data};
14              
15             if($snac->{flags2}) {
16             $connection->log_printf(OSCAR_DBG_SIGNON, "Got buddylist segment -- need %d more.", $snac->{flags2});
17             } else {
18             delete $session->{gotbl};
19              
20             Net::OSCAR::_BLInternal::blparse($session, join("", @{$session->{blarray}}));
21             delete $session->{blarray};
22             got_buddylist($session, $connection);
23             }
24              
25             };