| 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__ | ||