Fluent/Elements/Variant.pm

filter: Statementstmt 92.8% 13 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 89.4% 17 / 19 CC 1 SCAR 2.2
CC
1
Cov
93%
__ANON__
2.0
BEGIN
1.0
__ANON__
1.0
CRAP 1.2
« Fluent/Elements/Attribute.pm ↑ Summary Fluent.pm »
1 package Translate::Fluent::Elements::Variant;
2  
3 6 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 extends 'Translate::Fluent::Elements::Base';
5  
6 has [qw(
7 identifier
8 pattern
9 )] => (
10 is => 'ro',
11 0 ▶ default => sub { undef },
Subroutine __ANON__: not called CC=1 SCAR=6.9
12 6 );
13  
14 12 ▶around BUILDARGS => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
15 12 my ($orig, $class, %args) = @_;
16  
17 12 $args{identifier} = delete $args{ Identifier };
18 12 $args{pattern} = delete $args{ Pattern };
19  
20 12 $class->$orig( %args );
21 6 };
22  
23 6 ▶sub translate {
Subroutine translate: called CC=1 SCAR=0.0
Pod documented
24 6 my ($self, $variables) = @_;
25  
26 6 return $self->pattern->translate( $variables );
27 }
28  
29 6 1;
30  
31 __END__
« Fluent/Elements/Attribute.pm ↑ Summary Fluent.pm »