File Coverage

blib/lib/XML/NewsML_G2/News_Item_Video.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package XML::NewsML_G2::News_Item_Video;
2              
3 18     18   124 use Moose;
  18         48  
  18         151  
4 18     18   117615 use namespace::autoclean;
  18         44  
  18         169  
5              
6             extends 'XML::NewsML_G2::News_Item';
7              
8             has '+nature', default => 'video';
9             has '+remotes', isa => 'HashRef[XML::NewsML_G2::Video]';
10             has 'icon',
11             isa => 'ArrayRef[XML::NewsML_G2::Icon]',
12             is => 'rw',
13             default => sub { [] },
14             traits => ['Array'],
15             handles => { add_icon => 'push', has_icon => 'count' };
16              
17             __PACKAGE__->meta->make_immutable;
18              
19             1;
20             __END__
21              
22             =head1 NAME
23              
24             XML::NewsML_G2::News_Item_Video - a video news item (story)
25              
26             =for test_synopsis
27             my ($provider, $service, $genre1, $genre2);
28              
29             =head1 SYNOPSIS
30              
31             my $ni = XML::NewsML_G2::News_Item_Video->new
32             (guid => "tag:example.com,2013:service:date:number",
33             title => "Story title",
34             slugline => "the/slugline",
35             language => 'de',
36             provider => $provider,
37             service => $service,
38             );
39              
40             $ni->add_genre($genre1, $genre2);
41             $ni->add_source('APA');
42             my $hd = XML::NewsML_G2::Video->new(
43             width => 1920, height => 1080,
44             size => '23013531', duration => 30, audiochannels => 'stereo'
45             );
46              
47             $ni->add_remote('file:///tmp/files/123.hd.mp4', $hd);
48              
49              
50             =head1 AUTHOR
51              
52             Stefan Hrdlicka C<< <stefan.hrdlicka@apa.at> >>
53              
54             =head1 LICENCE AND COPYRIGHT
55              
56             Copyright (c) 2013, APA-IT. All rights reserved.
57              
58             See L<XML::NewsML_G2> for the license.