blib/lib/XML/NewsML_G2/Role/HasTranslations.pm

filter: Statementstmt 100% 9 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 12 / 12 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
__ANON__
1.0
CRAP 1.0
« blib/lib/XML/NewsML_G2/Role/HasQCode.pm ↑ Summary blib/lib/XML/NewsML_G2/Role/Remote.pm »
1 package XML::NewsML_G2::Role::HasTranslations;
2  
3 24 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 24 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 has 'translations',
7 isa => 'HashRef',
8 is => 'rw',
9 49 ▶ default => sub { {} },
Subroutine __ANON__: called CC=1 SCAR=0.0
10 24 traits => ['Hash'],
11 handles => { add_translation => 'set' };
12  
13 24 1;
14 __END__
15  
16 =head1 NAME
17  
18 XML::NewsML_G2::Role::HasTranslations - Role for item types that have translations
19  
20 =head1 SYNOPSIS
21  
22 my $media_topic = XML::NewsML_G2::Media_Topic->new
23 (name => 'alpine skiing',
24 qcode => 20001057);
25 $media_topic->add_translation('de', 'alpiner Skilauf')
26  
27 =head1 DESCRIPTION
28  
29 This module serves as a role for all NewsML-G2 item type classes which have
30 translations
31  
32 =head1 ATTRIBUTES
33  
34 =over 4
35  
36 =item translations
37  
38 Hash mapping from language to according translation
39  
40 =back
41  
42 =head1 AUTHOR
43  
44 Christian Eder C<< <christian.eder@apa.at> >>
45  
46 =head1 LICENCE AND COPYRIGHT
47  
48 Copyright (c) 2019, APA-IT. All rights reserved.
49  
50 See L<XML::NewsML_G2> for the license.
« blib/lib/XML/NewsML_G2/Role/HasQCode.pm ↑ Summary blib/lib/XML/NewsML_G2/Role/Remote.pm »