lib/Image/Randim/Image.pm

filter: Statementstmt 100% 22 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 26 / 26 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/Image/Randim/Source/Role.pm ↑ Summary
1 package Image::Randim::Image;
2 1 our $VERSION = '0.01';
3 1 ▶use v5.20;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 has 'id' => ( is => 'rw',
9 isa => 'Str',
10 );
11 1 has 'width' => ( is => 'rw',
12 isa => 'Int',
13 );
14 1 has 'height' => ( is => 'rw',
15 isa => 'Int',
16 );
17 1 has 'url' => ( is => 'rw',
18 isa => 'Str',
19 );
20 1 has 'filename' => ( is => 'rw',
21 isa => 'Str',
22 );
23 1 has 'owner' => ( is => 'rw',
24 isa => 'Maybe[Str]',
25 );
26 1 has 'owner_name' => ( is => 'rw',
27 isa => 'Maybe[Str]',
28 );
29 1 has 'link' => ( is => 'rw',
30 isa => 'Str',
31 );
32  
33 1 __PACKAGE__->meta->make_immutable;
34 1 1;
35  
36 =pod
37  
38 =head1 NAME
39  
40 Image::Randim::Image - Image object
41  
42 =head1 SYNOPSIS
43  
44 use Image::Randim::Source;
45
46 $source = Image::Randim::Source->new;
47 $source->set_provider('Desktoppr');
48 $image = $source->get_image;
49  
50 say $image->url;
51  
52 =head1 DESCRIPTION
53  
54 This is the image object returned by Image::Randim::Source which
55 contains information about the image.
56  
57 =head1 ATTRIBUTES
58  
59 =head2 C<url>
60  
61 The URL where the image can be reached.
62  
63 =head2 C<link>
64  
65 The URL that links to the page at the source that gives credit to the
66 creator and where you can find more detailed information about the
67 image.
68  
69 =head2 C<owner>
70  
71 The userid of the owner (author, creator) of the image. Not always
72 there.
73  
74 =head2 C<owner_name>
75  
76 The full name of the owner, which is not always there.
77  
78 =head2 C<width>
79  
80 The width in pixels, AS REPORTED BY THE SOURCE SITE.
81  
82 =head2 C<height>
83  
84 The height in pixels, AS REPORTED BY THE SOURCE SITE.
85  
86 =head2 C<filename>
87  
88 The local filename, either provided by the source site or created
89 locally. This is not set usually on the source call, but rather on the
90 download call -- don't count on this to be set unless you or a script
91 set it.
92  
93 =head1 AUTHOR
94  
95 Mark Rushing <mark@orbislumen.net>
96  
97 =head1 COPYRIGHT AND LICENSE
98  
99 This software is copyright (c) 2017 by Home Grown Systems, SPC.
100  
101 This is free software; you can redistribute it and/or modify it under
102 the same terms as the Perl 5 programming language system itself.
103  
104 =cut
« lib/Image/Randim/Source/Role.pm ↑ Summary