| 1 | package XML::NewsML_G2::Scheme; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 23 | ▶ | use Moose; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 23 | ▶ | use namespace::autoclean; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 23 | has 'alias', isa => 'Str', is => 'ro', required => 1; | |||||||||||||||||||||||||||
| 7 | 23 | has 'uri', isa => 'Str', is => 'ro'; | |||||||||||||||||||||||||||
| 8 | 23 | has 'catalog', isa => 'Str', is => 'ro'; | |||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | sub BUILD { | ||||||||||||||||||||||||||||
| 11 | 263 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
BUILD: called CC=3 SCAR=11.4
Pod
undocumented
| |||||||||||||||||||||||||||||
| 12 | 263 | ▶ | die "Either uri or catalog is required\n" | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$self->uri or $self->catalog
MC/DC0%0/2
$self->uri or $self->catalog
$self->uri
$self->catalog
Truth table66%2/3
A or B
A= $self->uriB= $self->catalog
| |||||||||||||||||||||||||||||
| 13 | unless ( $self->uri or $self->catalog ); | ||||||||||||||||||||||||||||
| 14 | 263 | return; | |||||||||||||||||||||||||||
| 15 | } | ||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | 23 | __PACKAGE__->meta->make_immutable; | |||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | 23 | 1; | |||||||||||||||||||||||||||
| 20 | __END__ | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | =head1 NAME | ||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | XML::NewsML_G2::Scheme - a Scheme (controlled vocabulary) | ||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | my $genre = XML::NewsML_G2::Scheme->new | ||||||||||||||||||||||||||||
| 29 | (alias => "genre", | ||||||||||||||||||||||||||||
| 30 | uri => "http://cv.iptc.org/newscodes/genre/", | ||||||||||||||||||||||||||||
| 31 | catalog => "http://www.iptc.org/std/catalog/catalog.IPTC-G2-Standards_22.xml"); | ||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | =head1 ATTRIBUTES | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | =over 4 | ||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | =item alias | ||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | The alias to be used for this scheme in the created output, required. | ||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||
| 41 | =item uri | ||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | String containing the URI of this scheme | ||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | =item catalog | ||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | Optional string containing the URI of the catalog containing this scheme | ||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||
| 49 | =back | ||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||
| 51 | =head1 AUTHOR | ||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | Philipp Gortan C<< <philipp.gortan@apa.at> >> | ||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | =head1 LICENCE AND COPYRIGHT | ||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | Copyright (c) 2013-2014, APA-IT. All rights reserved. | ||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | See L<XML::NewsML_G2> for the license. | ||||||||||||||||||||||||||||