Mildew/AST/StringConstant.pm

filter: Statementstmt 69.0% 29 / 42 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 70.5% 12 / 17 Podpod n/a totaltotal 69.4% 41 / 59 CC 1 SCAR 1.2
CC
1
Cov
69%
__ANON__
1.6
__ANON__
1.3
__ANON__
1.3
CRAP 1.1
« Mildew/AST/While.pm ↑ Summary Mildew/AST/Let.pm »
1 4 ▶use v5.10;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 4 ▶use MooseX::Declare;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 4 ▶class Mildew::AST::StringConstant extends Mildew::AST::Base {;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.5
4 4 has 'value' => (is=>'ro');
5 0 ▶ has 'type_info' => (is=>'ro',lazy=>1,default=>sub {Mildew::TypeInfo::StringConstant->new()});
Subroutine __ANON__: not called CC=1 SCAR=1.2
6 0 ▶ method m0ld($ret) {
Subroutine BEGIN: called CC=1 SCAR=1.2
Subroutine __ANON__: not called CC=1 SCAR=2.6
7 #XXX metachars
8 0 "my $ret = \"".$self->m0ld_literal."\";\n";
9 4 }
10 0 ▶ method pretty {
Subroutine BEGIN: called CC=1 SCAR=1.2
Subroutine __ANON__: not called CC=1 SCAR=2.6
11 #XXX metachars
12 0 '"' . $self->value . '"'
13 4 }
14 0 ▶ method simplified {
Subroutine BEGIN: called CC=1 SCAR=1.2
Subroutine __ANON__: not called CC=1 SCAR=2.6
15 0 $self;
16 4 }
17 0 ▶ method m0ld_literal {
Subroutine BEGIN: called CC=1 SCAR=1.2
Subroutine __ANON__: not called CC=1 SCAR=4.9
18 0 my $str = $self->value;
19 0 $str =~ s/\\/\\\\/g;
20 0 $str =~ s/"/\\"/g;
21 0 $str =~ s/\n/\\n/g;
22 0 $str;
23 4 }
24 4 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
« Mildew/AST/While.pm ↑ Summary Mildew/AST/Let.pm »