OpenGbg/Service/StyrOchStall/GetBikeStation.pm

filter: Statementstmt 96.9% 32 / 33 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.8% 8 / 9 Podpod n/a totaltotal 95.2% 40 / 42 CC 1 SCAR 1.1
CC
1
Cov
97%
_build_timestamp
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« OpenGbg/Service/Bridge/GetIsCurrentlyOpen.pm ↑ Summary OpenGbg/Elk.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::StyrOchStall::GetBikeStation;
6  
7 # ABSTRACT: Get data about a bike station
8 7 our $AUTHORITY = 'cpan:CSSON'; # AUTHORITY
9 7 our $VERSION = '0.1404';
10  
11 7 ▶use XML::Rabbit::Root;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 7 ▶use DateTime::Format::HTTP;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 7 ▶use MooseX::AttributeShortcuts;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 7 ▶use Types::Standard qw/Str/;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 7 ▶use Types::DateTime qw/DateTime/;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 7 has xml => (
18 is => 'ro',
19 isa => Str,
20 required => 1,
21 );
22  
23 7 add_xpath_namespace 'x' => 'TK.DevServer.Services.RentalBikeService';
24  
25 7 has_xpath_value _timestamp => '/x:RentalBikes/x:TimeStamp';
26  
27 7 has_xpath_object station => '/x:RentalBikes/x:Stations[1]/x:Details' => 'OpenGbg::Service::StyrOchStall::Station',
28 handles => [qw/label capacity free_bikes free_stands full empty to_text/];
29  
30 7 has timestamp => (
31 is => 'ro',
32 isa => DateTime,
33 lazy => 1,
34 builder => 1,
35 );
36  
37 0 ▶sub _build_timestamp {
Subroutine _build_timestamp: not called CC=1 SCAR=6.9
38 0 return DateTime::Format::HTTP->parse_datetime(shift->_timestamp);
39 }
40  
41 7 finalize_class();
42  
43 7 1;
44  
45 __END__
« OpenGbg/Service/Bridge/GetIsCurrentlyOpen.pm ↑ Summary OpenGbg/Elk.pm »