File Coverage

blib/lib/WebService/Shutterstock/LicensedImage.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 21 22 95.4


line stmt bran cond sub pod time code
1             package WebService::Shutterstock::LicensedImage;
2             {
3             $WebService::Shutterstock::LicensedImage::VERSION = '0.006';
4             }
5              
6             # ABSTRACT: Allows for interogating and saving a licensed image from the Shutterstock API
7              
8 9     9   49 use strict;
  9         17  
  9         299  
9 9     9   46 use warnings;
  9         20  
  9         213  
10 9     9   47 use Moo;
  9         15  
  9         49  
11              
12 9     9   8112 use WebService::Shutterstock::LicensedMedia;
  9         38  
  9         1395  
13             with 'WebService::Shutterstock::LicensedMedia';
14              
15             my @attrs = qw(photo_id thumb_large_url allotment_charge);
16             foreach my $attr(@attrs){
17             has $attr => (is => 'ro');
18             }
19              
20              
21             sub BUILDARGS {
22 1     1 0 1361 my $args = shift->SUPER::BUILDARGS(@_);
23 1         20 $args->{download_url} = $args->{download}->{url};
24 1         5 $args->{thumb_large_url} = $args->{thumb_large}->{url};
25 1         24 return $args;
26             }
27              
28              
29             1;
30              
31             __END__