Fluent/Elements/BlockText.pm

filter: Statementstmt 91.6% 11 / 12 Branchbran n/a Conditioncond 50.0% 2 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 73.9% 17 / 23 CC 3 SCAR 8.2
CC
3
Cov
81%
__ANON__
3.2
__ANON__
2.0
BEGIN
1.0
CRAP 2.3
« Fluent/ResourceSet.pm ↑ Summary Fluent/Elements/NamedArgument.pm »
1 package Translate::Fluent::Elements::BlockText;
2  
3 6 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 extends 'Translate::Fluent::Elements::Base';
5  
6 has text => (
7 is => 'ro',
8 0 ▶ default => sub { undef },
Subroutine __ANON__: not called CC=1 SCAR=6.9
9 6 );
10  
11  
12 20 ▶around BUILDARGS => sub {
Subroutine __ANON__: called CC=3 SCAR=11.7
13 20 my ($orig, $class, %args) = @_;
14  
15 20 ▶ my $text = ($args{indented_char}//'').($args{inline_text}//'');
Condition50%2/4
$args{"indented_char"} // ""
l!l
200
$args{"inline_text"} // ""
l!l
200
MC/DC0%0/1
$args{"indented_char"} // ""
$args{"indented_char"}
MC/DC0%0/1
$args{"inline_text"} // ""
$args{"inline_text"}
Truth table50%1/2
A
A= $args{"indented_char"}
Aresult
11
00
Truth table50%1/2
A
A= $args{"inline_text"}
Aresult
11
00
16  
17 20 $class->$orig( text => $text );
18 6 };
19  
20 10 ▶sub translate {
Subroutine translate: called CC=1 SCAR=0.0
Pod documented
21 10 return "\n".$_[0]->text;
22 }
23  
24 6 1;
25  
26 __END__
« Fluent/ResourceSet.pm ↑ Summary Fluent/Elements/NamedArgument.pm »