OpenGbg/Service/TrafficCamera/GetCameraImage.pm

filter: Statementstmt 93.7% 30 / 32 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 8 / 10 Podpod n/a totaltotal 90.4% 38 / 42 CC 1 SCAR 1.8
CC
1
Cov
94%
_build_image_size
2.0
_build_timestamp
2.0
BEGIN
1.0
CRAP 1.2
« OpenGbg/Service/AirQuality.pm ↑ Summary OpenGbg/Service/Bridge/BridgeOpening.pm »
1 7 ▶use 5.10.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package OpenGbg::Service::TrafficCamera::GetCameraImage;
6  
7 # ABSTRACT: Get the current image from a traffic camera
8 7 our $AUTHORITY = 'cpan:CSSON'; # AUTHORITY
9 7 our $VERSION = '0.1404';
10  
11 7 ▶use OpenGbg::Elk;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 7 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 7 ▶use Types::Standard qw/Int/;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 7 ▶use Types::DateTime qw/DateTime/;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 7 ▶use DateTime;
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 7 has image => (
19 is => 'ro',
20 );
21 7 has image_size => (
22 is => 'ro',
23 isa => Int,
24 lazy => 1,
25 builder => 1,
26 );
27 7 has timestamp => (
28 is => 'ro',
29 isa => DateTime,
30 lazy => 1,
31 builder => 1,
32 );
33  
34 0 ▶sub _build_image_size {
Subroutine _build_image_size: not called CC=1 SCAR=6.9
35 0 return length shift->image;
36 }
37  
38 0 ▶sub _build_timestamp {
Subroutine _build_timestamp: not called CC=1 SCAR=6.9
39 0 my $datetime = DateTime::->now->truncate(to => 'minute')->set_time_zone('Europe/Stockholm');
40 }
41  
42 7 __PACKAGE__->meta->make_immutable;
43  
44 7 1;
45  
46 __END__
« OpenGbg/Service/AirQuality.pm ↑ Summary OpenGbg/Service/Bridge/BridgeOpening.pm »