« OpenGbg/Service/TrafficCamera/CameraDevice.pm
↑ Summary
OpenGbg/Service/StyrOchStall/GetBikeStation.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::Bridge::GetIsCurrentlyOpen; | ||
| 6 | |||
| 7 | # ABSTRACT: Is the bridge currently open? | ||
| 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 Bool/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | 7 | has xml => ( | |
| 17 | is => 'ro', | ||
| 18 | isa => Str, | ||
| 19 | required => 1, | ||
| 20 | ); | ||
| 21 | |||
| 22 | 7 | add_xpath_namespace 'x' => 'TK.DevServer.Services.BridgeService'; | |
| 23 | |||
| 24 | 7 | has_xpath_value _is_open => '/x:BridgeOpen/x:Value'; | |
| 25 | |||
| 26 | 7 | has is_open => ( | |
| 27 | is => 'ro', | ||
| 28 | isa => Bool, | ||
| 29 | lazy => 1, | ||
| 30 | builder => 1, | ||
| 31 | ); | ||
| 32 | |||
| 33 | 0 | ▶ | sub _build_is_open { |
|
Subroutine
_build_is_open: not called CC=1 SCAR=6.9
| |||
| 34 | 0 | return shift->_is_open eq 'true'; | |
| 35 | } | ||
| 36 | |||
| 37 | 7 | finalize_class(); | |
| 38 | |||
| 39 | 7 | 1; | |
| 40 | |||
| 41 | __END__ | ||