DJabberd/ClusterMessage.pm

filter: Statementstmt 56.5% 13 / 23 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 4 / 8 Podpod 0.0% 0 / 4 totaltotal 45.9% 17 / 37 CC 2 SCAR 8.9
CC
2
Cov
52%
new
6.0
thaw
2.0
as_packet
2.0
CRAP 2.4
« DJabberd/SASL/DumbPlainManager.pm ↑ Summary DJabberd/Connection/ClusterOut.pm »
1 package DJabberd::ClusterMessage;
2 20 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 20 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 20 ▶use Storable ();
Subroutine BEGIN: called CC=1 SCAR=0.0
6 20 ▶use fields ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
9 0 my $self = shift;
10 0 ▶ $self = fields::new($self) unless ref $self;
Branch: 1 branch
BranchTrueFalseTotal
unless ref $self 0 0 0
11  
12 0 return $self;
13 }
14  
15 0 ▶sub thaw {
Subroutine thaw: not called CC=1 SCAR=6.9
Pod undocumented
16 0 my ($class, $dataref) = @_;
17 0 return Storable::thaw($$dataref);
18 }
19  
20 0 ▶sub as_packet {
Subroutine as_packet: not called CC=1 SCAR=6.9
Pod undocumented
21 0 my $self = shift;
22 0 my $freeze = Storable::nfreeze($self);
23 0 return "DJAB" . pack("N", length $freeze) . $freeze;
24 }
25  
26 0 ▶sub process {
Subroutine process: not called CC=1 SCAR=6.9
Pod undocumented
27 0 my ($self, $vhost) = @_;
28 0 print "processing $self w/ vhost = $vhost\n";
29 }
30  
31 20 1;
« DJabberd/SASL/DumbPlainManager.pm ↑ Summary DJabberd/Connection/ClusterOut.pm »