Fluent/Elements/Attribute.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/ResourceGroup/Context.pm ↑ Summary Fluent/Elements/Variant.pm »
1 package Translate::Fluent::Elements::Attribute;
2  
3 6 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 extends 'Translate::Fluent::Elements::Base';
5  
6 has [qw(identifier pattern)] => (
7 is => 'ro',
8 0 ▶ default => sub { undef },
Subroutine __ANON__: not called CC=1 SCAR=6.9
9 6 );
10  
11 78 ▶around BUILDARGS => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
12 78 my ($orig, $class, %args) = @_;
13  
14 78 $args{ identifier } = delete $args{ Identifier };
15 78 $args{ pattern } = delete $args{ Pattern };
16  
17 78 $class->$orig( %args );
18 6 };
19  
20 13 ▶sub translate {
Subroutine translate: called CC=1 SCAR=0.0
Pod documented
21 13 my ($self, $variables) = @_;
22  
23 13 return $self->pattern->translate( $variables );
24 }
25  
26  
27 6 1;
28  
29 __END__
« Fluent/ResourceGroup/Context.pm ↑ Summary Fluent/Elements/Variant.pm »