line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package XML::NewsML_G2::Translatable_Text; |
2
|
|
|
|
|
|
|
|
3
|
18
|
|
|
18
|
|
125
|
use Moose; |
|
18
|
|
|
|
|
48
|
|
|
18
|
|
|
|
|
117
|
|
4
|
18
|
|
|
18
|
|
77895
|
use namespace::autoclean; |
|
18
|
|
|
|
|
79
|
|
|
18
|
|
|
|
|
135
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
with 'XML::NewsML_G2::Role::HasTranslations'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has 'text', is => 'ro', isa => 'Str', required => 1; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
1; |
13
|
|
|
|
|
|
|
__END__ |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 NAME |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
XML::NewsML_G2::Translatable_Text - a text with optional translations |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SYNOPSIS |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
my $text = XML::NewsML_G2::Translatable_Text->new(text => 'Freizeit'); |
22
|
|
|
|
|
|
|
$text->add_translation('en', 'leisure'); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=over 4 |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=item text |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Default (untranslated) text content |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=back |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 METHODS |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=over 4 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=item add_translation |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Define a translation for the text |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=back |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 AUTHOR |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Christian Eder C<< <christian.eder@apa.at> >> |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 LICENCE AND COPYRIGHT |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Copyright (c) 2019, APA-IT. All rights reserved. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
See L<XML::NewsML_G2> for the license. |