| 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
| |||||||||||
| 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; | |||||||||