line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package XML::NewsML_G2::News_Item_Picture; |
2
|
|
|
|
|
|
|
|
3
|
18
|
|
|
18
|
|
9210
|
use Moose; |
|
18
|
|
|
|
|
44
|
|
|
18
|
|
|
|
|
103
|
|
4
|
18
|
|
|
18
|
|
106634
|
use namespace::autoclean; |
|
18
|
|
|
|
|
54
|
|
|
18
|
|
|
|
|
107
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
extends 'XML::NewsML_G2::News_Item'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has '+nature', default => 'picture'; |
9
|
|
|
|
|
|
|
has '+remotes', isa => 'HashRef[XML::NewsML_G2::Picture]'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has 'photographer', isa => 'XML::NewsML_G2::Creator', is => 'rw', coerce => 1; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
1; |
16
|
|
|
|
|
|
|
__END__ |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 NAME |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
XML::NewsML_G2::News_Item_Picture - a picture news item |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=for test_synopsis |
23
|
|
|
|
|
|
|
my ($provider, $service, $genre1, $genre2); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 SYNOPSIS |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $ni = XML::NewsML_G2::News_Item_Picture->new |
28
|
|
|
|
|
|
|
(guid => "tag:example.com,2013:service:date:number", |
29
|
|
|
|
|
|
|
title => "Story title", |
30
|
|
|
|
|
|
|
slugline => "the/slugline", |
31
|
|
|
|
|
|
|
language => 'de', |
32
|
|
|
|
|
|
|
provider => $provider, |
33
|
|
|
|
|
|
|
service => $service, |
34
|
|
|
|
|
|
|
photographer => 'Homer Simpson' |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
my $pic = XML::NewsML_G2::Picture->new |
38
|
|
|
|
|
|
|
(mimetype => 'image/jpg', |
39
|
|
|
|
|
|
|
rendition => 'highRes', |
40
|
|
|
|
|
|
|
width => 1600, |
41
|
|
|
|
|
|
|
height => 1024 |
42
|
|
|
|
|
|
|
); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
my $thumb = XML::NewsML_G2::Picture->new |
45
|
|
|
|
|
|
|
(mimetype => 'image/jpg', |
46
|
|
|
|
|
|
|
rendition => 'thumb', |
47
|
|
|
|
|
|
|
width => 48, |
48
|
|
|
|
|
|
|
height => 32 |
49
|
|
|
|
|
|
|
); |
50
|
|
|
|
|
|
|
$ni->add_remote('file://tmp/files/123.jpg', $pic); |
51
|
|
|
|
|
|
|
$ni->add_remote('file://tmp/files/123.thumb.jpg', $thumb); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=over 4 |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=item photographer |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
A photographer string |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=back |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 AUTHOR |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Christian Eder C<< <christian.eder@apa.at> >> |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 LICENCE AND COPYRIGHT |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Copyright (c) 2013, APA-IT. All rights reserved. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
See L<XML::NewsML_G2> for the license. |