blib/lib/XML/NewsML_G2/News_Item_Picture.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 14 / 14 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/XML/NewsML_G2/News_Item_Graphics.pm ↑ Summary blib/lib/XML/NewsML_G2/News_Item_Text.pm »
1 package XML::NewsML_G2::News_Item_Picture;
2  
3 20 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 20 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 20 extends 'XML::NewsML_G2::News_Item';
7  
8 20 has '+nature', default => 'picture';
9 20 has '+remotes', isa => 'HashRef[XML::NewsML_G2::Picture]';
10  
11 20 has 'photographer', isa => 'XML::NewsML_G2::Creator', is => 'rw', coerce => 1;
12  
13 20 __PACKAGE__->meta->make_immutable;
14  
15 20 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.
« blib/lib/XML/NewsML_G2/News_Item_Graphics.pm ↑ Summary blib/lib/XML/NewsML_G2/News_Item_Text.pm »