blib/lib/XML/NewsML_G2/Media_Topic.pm

filter: Statementstmt 100% 11 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 13 / 13 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/XML/NewsML_G2/Location.pm ↑ Summary blib/lib/XML/NewsML_G2/News_Item_Audio.pm »
1 package XML::NewsML_G2::Media_Topic;
2  
3 20 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 20 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 20 with(
7 'XML::NewsML_G2::Role::HasQCode',
8 'XML::NewsML_G2::Role::HasTranslations'
9 );
10  
11 20 has 'parent', isa => __PACKAGE__, is => 'rw';
12 20 has 'direct', isa => 'Bool', is => 'rw', default => '';
13  
14 20 __PACKAGE__->meta->make_immutable;
15  
16 20 1;
17 __END__
18  
19 =head1 NAME
20  
21 XML::NewsML_G2::Media_Topic - a subject covered in the news item,
22 taken from a standardized controlled vocabulary
23  
24 =head1 SYNOPSIS
25  
26 my $mm = XML::NewsML_G2::Media_Topic->new
27 (name => 'mass media', qcode => 20000045);
28 my $tv = XML::NewsML_G2::Media_Topic->new
29 (name => 'television', qcode => 20000051, parent => $mm);
30 $tv->add_translation(de => 'Fernsehen')
31  
32 =head1 ATTRIBUTES
33  
34 =over 4
35  
36 =item translations
37  
38 hash mapping IANA language codes to the translation of the name in that language
39  
40 =item parent
41  
42 points to the broader media topic
43  
44 =item direct
45  
46 whether the media topic has been manually specified by the editor
47  
48 =back
49  
50 =head1 METHODS
51  
52 =over 4
53  
54 =item add_translation
55  
56 =back
57  
58 =head1 AUTHOR
59  
60 Philipp Gortan C<< <philipp.gortan@apa.at> >>
61  
62 =head1 LICENCE AND COPYRIGHT
63  
64 Copyright (c) 2013-2019, APA-IT. All rights reserved.
65  
66 See L<XML::NewsML_G2> for the license.
« blib/lib/XML/NewsML_G2/Location.pm ↑ Summary blib/lib/XML/NewsML_G2/News_Item_Audio.pm »