« OpenGbg/Service/Bridge/BridgeOpening.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.1402'; | |
| 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 | sub _build_is_open { | ||
| 34 | 0 | ▶ | return shift->_is_open eq 'true'; |
|
Subroutine
_build_is_open: not called CC=1 SCAR=6.9
| |||
| 35 | } | ||
| 36 | |||
| 37 | 7 | finalize_class(); | |
| 38 | |||
| 39 | 7 | 1; | |
| 40 | |||
| 41 | __END__ | ||
| 42 | |||
| 43 | =pod | ||
| 44 | |||
| 45 | =encoding utf-8 | ||
| 46 | |||
| 47 | =head1 NAME | ||
| 48 | |||
| 49 | OpenGbg::Service::Bridge::GetIsCurrentlyOpen - Is the bridge currently open? | ||
| 50 | |||
| 51 | =head1 VERSION | ||
| 52 | |||
| 53 | Version 0.1402, released 2016-08-12. | ||
| 54 | |||
| 55 | =head1 SYNOPSIS | ||
| 56 | |||
| 57 | my $bridge = OpenGbg->new->bridge; | ||
| 58 | my $get_ico = $bridge->get_is_currently_open; | ||
| 59 | |||
| 60 | print $get_ico->is_open ? 'It is open' : 'It is closed'; | ||
| 61 | |||
| 62 | =head1 METHODS | ||
| 63 | |||
| 64 | =head2 is_open | ||
| 65 | |||
| 66 | Returns a true value if the bridge is open, false if not. | ||
| 67 | |||
| 68 | =head1 SOURCE | ||
| 69 | |||
| 70 | L<https://github.com/Csson/p5-OpenGbg> | ||
| 71 | |||
| 72 | =head1 HOMEPAGE | ||
| 73 | |||
| 74 | L<https://metacpan.org/release/OpenGbg> | ||
| 75 | |||
| 76 | =head1 AUTHOR | ||
| 77 | |||
| 78 | Erik Carlsson <info@code301.com> | ||
| 79 | |||
| 80 | =head1 COPYRIGHT AND LICENSE | ||
| 81 | |||
| 82 | This software is copyright (c) 2016 by Erik Carlsson. | ||
| 83 | |||
| 84 | This is free software; you can redistribute it and/or modify it under | ||
| 85 | the same terms as the Perl 5 programming language system itself. | ||
| 86 | |||
| 87 | =cut | ||