The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WWW:LiveDepartureBoards - presents an OO interface to the National Rail Live Departure Boards (LDB's) Website (http://www.livedepartureboards.co.uk).

DESCRIPTION

Queries and then screenscrapes the LDB's website, making a guess as to what day the given arrival or departure time is on and constructing a DateTime object as part of the details returned. Can also filter by the stations you are interested in.

METHODS

new({station_code => 'XXX'})

Takes a 3 letter station code such as PNE (Penge East) and returns the corresponding object. You can find out what your local station's code is by visiting the website mentioned above.

arrivals(['Station Name'])

Returns an array of hashes with arrival details as follows,

    origin   - the origin of the train
    time     - time in the form of 'hh:mm'
    datetime - a DateTime object that has been tied to the best guess of
               what day the train arrives/departs on
    status   - the status of the train

Also a reference to a list can be supplied that will act as a filter.

departures(['Station Name'])

Returns an array of hashes with departure details as follows,

    destination - the origin of the train
    time        - time in the form of 'hh:mm'
    datetime    - a DateTime object that has been tied to the best guess of
                  what day the train arrives/departs on
    status      - the status of the train

Also a reference to a list can be supplied that will act as a filter.

destination({station_code => 'XXX'})

Returns an array of hashes with departure details as follows,

    station_code - the final destination name of the train
    time         - time in the form of 'hh:mm'
    datetime     - a DateTime object that has been tied to the best guess of
                   what day the train arrives/departs on
    status       - the status of the train

AUTHOR

Greg McCarroll <greg@mccarroll.org.uk> Adam Trickett <adam.trickett@iredale.net>

COPYRIGHT

Copyright 2005-2007 Greg McCarroll. All Rights Reserved.

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

SEE ALSO

WWW:NationalRail