blib/lib/XML/NewsML_G2/Location.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 16 / 16 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/XML/NewsML_G2/Genre.pm ↑ Summary blib/lib/XML/NewsML_G2/Media_Topic.pm »
1 package XML::NewsML_G2::Location;
2  
3 # $Id: Location.pm 47068 2013-07-03 12:17:55Z apatecgortan $
4  
5 10 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 10 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 10 has 'name', isa => 'Str', is => 'ro', required => 1;
9 10 has 'qcode', isa => 'Str', is => 'ro', required => 1;
10 10 has 'relevance', isa => 'Int', is => 'ro', required => 1;
11 10 has 'parent', isa => __PACKAGE__, is => 'rw';
12 10 has 'direct', isa => 'Bool', is => 'rw', default => '';
13 10 has 'iso_code', isa => 'Str', is => 'rw';
14  
15 10 __PACKAGE__->meta->make_immutable;
16  
17 10 1;
18 __END__
19  
20 =head1 NAME
21  
22 XML::NewsML_G2::Location - a location (city, region, country, ...)
23  
24 =head1 SYNOPSIS
25  
26 my $at = XML::NewsML_G2::Location->new
27 (name => 'Austria', qcode => 'at', relevance => 90, iso_code => 'AT');
28  
29 my $vie = XML::NewsML_G2::Location->new
30 (name => 'Vienna', qcode => 'vie', relevance => 100, parent => $at);
31  
32 =head1 ATTRIBUTES
33  
34 =over 4
35  
36 =item name
37  
38 =item qcode
39  
40 =item relevance
41  
42 Value (0..100) specifying how relevant the location is for the news item
43  
44 =item parent
45  
46 points to the broader location (e.g., the city's country)
47  
48 =item direct
49  
50 whether the location has been manually specified by the editor
51  
52 =item iso_code
53  
54 for countries, the code in the ISO 3166-1a2 vocabulary - see
55 L<http://www.iso.org/iso/home/standards/country_codes/country_names_and_code_elements.htm>
56 for a reference
57  
58 =back
59  
60 =head1 AUTHOR
61  
62 Philipp Gortan C<< <philipp.gortan@apa.at> >>
63  
64 =head1 LICENCE AND COPYRIGHT
65  
66 Copyright (c) 2013, APA-IT. All rights reserved.
67  
68 See L<XML::NewsML_G2> for the license.
« blib/lib/XML/NewsML_G2/Genre.pm ↑ Summary blib/lib/XML/NewsML_G2/Media_Topic.pm »