Stomper/Frame.pm

filter: Statementstmt 93.5% 29 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 100% 1 / 1 totaltotal 92.3% 36 / 39 CC 1 SCAR 0.4
CC
1
Cov
94%
__ANON__
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Stomper/Cluster.pm ↑ Summary Stomper/Error.pm »
1 package AnyEvent::Stomper::Frame;
2  
3 5 ▶use 5.008000;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 5 our $VERSION = '0.36';
8  
9 5 ▶use Encode qw( decode );
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11  
12 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
13 1 my $class = shift;
14 1 my $command = shift;
15 1 my $headers = shift;
16 1 my $body = shift;
17  
18 1 my $self = bless {}, $class;
19  
20 1 $self->{command} = $command;
21 1 $self->{headers} = $headers;
22 1 $self->{body} = $body;
23  
24 1 return $self;
25 }
26  
27 # Generate getters
28 {
29 5 ▶ no strict qw( refs );
Subroutine BEGIN: called CC=1 SCAR=0.0
30  
31 5 foreach my $name ( qw( command headers body ) )
32 {
33 15 ▶ *{$name} = sub {
Subroutine __ANON__: not called CC=1 SCAR=2.6
34 0 my $self = shift;
35 0 return $self->{$name};
36 }
37 15 }
38 }
39  
40 5 1;
41 __END__
« Stomper/Cluster.pm ↑ Summary Stomper/Error.pm »