App/Message/Block.pm

filter: Statementstmt 100% 28 / 28 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 100% 1 / 1 totaltotal 97.5% 40 / 41 CC 3 SCAR 4.7
CC
3
Cov
97%
stringify
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.6
« App/Plugin/Version/Command.pm ↑ Summary App/Plugin/BashCompletion/Meta/Class.pm »
1 # ============================================================================
2 package MooseX::App::Message::Block;
3 # ============================================================================
4  
5 16 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 16 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 16 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 16 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 16 ▶use MooseX::App::Utils;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 use overload
14 16 ▶ '""' => "stringify";
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 16 has 'header' => (
17 is => 'ro',
18 isa => 'MooseX::App::Types::MessageString',
19 predicate => 'has_header',
20 );
21  
22 has 'type' => (
23 is => 'ro',
24 isa => 'Str',
25 129 ▶ default => sub {'default'},
Subroutine __ANON__: called CC=1 SCAR=0.0
26 16 );
27  
28 16 has 'body' => (
29 is => 'ro',
30 isa => 'MooseX::App::Types::MessageString',
31 predicate => 'has_body',
32 );
33  
34 6 ▶sub stringify {
Subroutine stringify: called CC=3 SCAR=11.0
Pod documented
35 6 my ($self) = @_;
36  
37 6 my $message = '';
38 6 ▶ $message .= $self->header."\n"
Branch: 1 branch
BranchTrueFalseTotal
if $self->has_header 5 1 6
39 if $self->has_header;
40  
41 6 ▶ $message .= $self->body."\n\n"
Branch: 1 branch
BranchTrueFalseTotal
if $self->has_body 6 0 6
42 if $self->has_body;
43  
44 6 return $message;
45 }
46  
47 16 __PACKAGE__->meta->make_immutable;
48 16 1;
49  
50 __END__
« App/Plugin/Version/Command.pm ↑ Summary App/Plugin/BashCompletion/Meta/Class.pm »