The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

OpenGbg::Service::Bridge::BridgeOpening - A change in status for Göta Älvbron

VERSION

Version 0.1404, released 2018-05-19.

SYNOPSIS

    my $bridge = OpenGbg->new->bridge;
    my $status = $bridge->get_opened_status->get_by_index(2);

    printf 'it was %s', $status->was_open ? 'open' : 'closed';

DESCRIPTIOn

Each BridgeOpening object only knows if the bridge was opened or closed at that time. Usually, an 'open' BridgeOpening is followed a few minutes later by a 'closed' one.

ATTRIBUTES

timestamp

A DateTime object.

The time the bridge was either open or closed.

was_open

Boolean. True if the bridge was open at timestamp, false if not.

SOURCE

https://github.com/Csson/p5-OpenGbg

HOMEPAGE

https://metacpan.org/release/OpenGbg

AUTHOR

Erik Carlsson <info@code301.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Erik Carlsson.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.