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