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