| 1 | package XML::NewsML_G2::Types; | ||
| 2 | |||
| 3 | 36 | ▶ | use Moose::Util::TypeConstraints; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 36 | ▶ | use Module::Runtime 'use_module'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 36 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 36 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 36 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 36 | enum 'XML::NewsML_G2::Types::Nature', | |
| 11 | [qw(text picture graphics audio video composite)]; | ||
| 12 | |||
| 13 | 36 | enum 'XML::NewsML_G2::Types::Group_Mode', [qw(bag sequential alternative)]; | |
| 14 | |||
| 15 | 36 | class_type 'XML::NewsML_G2::Link'; | |
| 16 | coerce 'XML::NewsML_G2::Link', from 'Str', | ||
| 17 | 15 | ▶ | via { use_module('XML::NewsML_G2::Link')->new( residref => $_ ) }; |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 18 | |||
| 19 | 36 | class_type 'XML::NewsML_G2::Destination'; | |
| 20 | coerce 'XML::NewsML_G2::Destination', from 'Str', | ||
| 21 | 0 | ▶ | via { use_module('XML::NewsML_G2::Destination')->new( name => $_ ) }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 22 | |||
| 23 | 36 | subtype 'XML::NewsML_G2::ArrayRefOfLinks', | |
| 24 | as 'ArrayRef[XML::NewsML_G2::Link]'; | ||
| 25 | coerce 'XML::NewsML_G2::ArrayRefOfLinks', from 'ArrayRef[HashRef]', via { | ||
| 26 | 0 | ▶ | [ map { XML::NewsML_G2::Link->new($_) } @$_ ] |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 27 | 36 | }; | |
| 28 | |||
| 29 | 36 | class_type 'XML::NewsML_G2::Creator'; | |
| 30 | coerce 'XML::NewsML_G2::Creator', from 'Str', | ||
| 31 | 43 | ▶ | via { use_module('XML::NewsML_G2::Creator')->new( name => $_ ) }; |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 32 | 36 | subtype 'XML::NewsML_G2::ArrayRefOfCreators', | |
| 33 | as 'ArrayRef[XML::NewsML_G2::Creator]'; | ||
| 34 | coerce 'XML::NewsML_G2::ArrayRefOfCreators', from 'ArrayRef[Str]', via { | ||
| 35 | 0 | ▶ | [ map { XML::NewsML_G2::Creator->new( name => $_ ) } @$_ ] |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 36 | 36 | }; | |
| 37 | |||
| 38 | 36 | 1; | |
| 39 | __END__ | ||
| 40 | |||
| 41 | =head1 NAME | ||
| 42 | |||
| 43 | XML::NewsML_G2::Types - various Moose attribute types used by NewsML_G2 classes | ||
| 44 | |||
| 45 | =head1 AUTHOR | ||
| 46 | |||
| 47 | Christian Eder C<< <christian.eder@apa.at> >> | ||
| 48 | |||
| 49 | =head1 LICENCE AND COPYRIGHT | ||
| 50 | |||
| 51 | Copyright (c) 2013, APA-IT. All rights reserved. | ||
| 52 | |||
| 53 | See L<XML::NewsML_G2> for the license. | ||