Branch Coverage

blib/lib/PubNub/PubSub.pm
Criterion Covered Total %
branch 6 64 9.3


line true false branch
16 0 1 @_ % 2 ? :
23 0 1 $args{'port'} == 443 ? :
32 0 0 if exists $$self{'ua'}
48 0 0 @_ % 2 ? :
60 0 0 if $callback
73 0 3 unless $pub_key
75 0 3 unless $sub_key
77 0 3 unless $channel
78 0 3 unless $params{'messages'}
90 0 0 @_ % 2 ? :
93 0 0 unless $sub_key
95 0 0 unless $channel
97 0 0 unless my $callback = $params{'callback'}
103 0 0 unless ($tx->success)
116 0 0 $params{'raw_msg'} ? :
118 0 0 $callback ? :
119 0 0 unless $rtn
127 0 0 @_ % 2 ? :
128 0 0 unless ref($params{'channels'}) =~ /ARRAY/
130 0 0 unless ref($params{'callback'}) =~ /(HASH|CODE)/
134 0 0 if (ref($params{'callback'}) =~ /HASH/)
136 0 0 unless ref($params{'callback'}{$_}) =~ /CODE/
143 0 0 unless ($channel)
144 0 0 if exists $$cb_dispatch{'on_connect'}
148 0 0 if (exists $$cb_dispatch{$channel}) { }
0 0 elsif (exists $$cb_dispatch{'_default'}) { }
164 0 0 unless ref $callback
174 0 0 if (scalar @_ == 1 and ref $_[0] ne 'HASH' and $_[0] =~ /^\d+$/)
179 0 0 @_ % 2 ? :
182 0 0 unless $sub_key
184 0 0 unless $channel
189 0 0 unless $tx->success