Message/Tag.pm

filter: Statementstmt 100% 29 / 29 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod 25.0% 1 / 4 totaltotal 93.1% 41 / 44 CC 2 SCAR 1.8
CC
2
Cov
100%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Message/Tag/To.pm ↑ Summary Message/Tag/Hr.pm »
1 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 package WebService::ChatWork::Message::Tag;
4 8 ▶use overload q{""} => \&as_string;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 8 ▶use constant PRIMARY => "message";
Subroutine BEGIN: called CC=1 SCAR=0.0
6 8 ▶use Mouse;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 8 has message => ( is => "ro", isa => "Str" );
9  
10 5 ▶sub new_with_primary {
Subroutine new_with_primary: called CC=1 SCAR=0.0
Pod undocumented
11 5 my $class = shift;
12 5 my $self = bless { $class->PRIMARY => shift }, $class;
13 5 return $self;
14 }
15  
16 7 ▶sub new_with_attributes {
Subroutine new_with_attributes: called CC=1 SCAR=0.0
Pod undocumented
17 7 my $class = shift;
18 7 return bless { @_ }, $class;
19 }
20  
21 12 ▶sub new {
Subroutine new: called CC=2 SCAR=6.9
Pod documented
22 12 my $class = shift;
23 12 my @args = @_;
24  
25 12 ▶ return $class->new_with_primary( @args )
Branch: 1 branch
BranchTrueFalseTotal
if @args == 1 5 7 12
26 if @args == 1;
27  
28 7 return $class->new_with_attributes( @args );
29 }
30  
31 1 ▶sub as_string {
Subroutine as_string: called CC=1 SCAR=0.0
Pod undocumented
32 1 my $self = shift;
33 1 my $name = $self->PRIMARY;
34 1 return $self->$name;
35 }
36  
37 8 1;
« Message/Tag/To.pm ↑ Summary Message/Tag/Hr.pm »