diff --git a/Changelog b/Changelog index d687a23d5de9850e1ff40e6b2455a5b5084c71bb..baf69e1ac52e6da9cc939aa5a52615513960f98d 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,12 @@ +Travel::Status::DE::DeutscheBahn 5.02 - Wed Dec 14 2023 + + * Fix calls to $journey->route crashing in handle_day_change or add_message + in some circumstances if the $hafas object that created $journey has + gone out of scope (and become eligible for garbage collection) in the + meantime. The culprit was a mis-application of weaken() introduced in + v5.01. + * hafas-m: Add -v/--via option + Travel::Status::DE::DeutscheBahn 5.01 - Sat Nov 25 2023 * Fix incorrect handling of HIM messages (introduced in 4.19) diff --git a/README.md b/README.md index 2107edcd3c9dae1f7fb13609384bff1236cbae61..0174a564a84a2a1591326de3f555670fe3d688d5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # hafas-m - Commandline Public Transit Departure Monitor -hafas-m is a commandline client and Perl module for HAFAS public transit +**hafas-m** is a commandline client and Perl module for HAFAS public transit departure interfaces, with a focus on the one operated by Deutsche Bahn. See the [Travel::Status::DE::HAFAS homepage](https://finalrewind.org/projects/Travel-Status-DE-DeutscheBahn) and diff --git a/bin/hafas-m b/bin/hafas-m index 2bf2e5a583b778bbe43c3244368ac78239ad9971..b24ed1f9fdaba2499480508da68fb3f08b01ec56 100755 --- a/bin/hafas-m +++ b/bin/hafas-m @@ -3,7 +3,7 @@ use strict; use warnings; use 5.014; -our $VERSION = '5.01'; +our $VERSION = '5.02'; use utf8; use DateTime; @@ -552,7 +552,7 @@ B<hafas-m> [B<-s> I<service>] [B<-l> I<language>] B<!>I<query>|I<journeyID> =head1 VERSION -version 5.01 +version 5.02 =head1 DESCRIPTION diff --git a/lib/Travel/Status/DE/DeutscheBahn.pm b/lib/Travel/Status/DE/DeutscheBahn.pm index c03f15463973e51a52587817ddced9fc3e5ae18c..4a4e912b613ea0c5a55e36de73406aaa2d7b20ff 100644 --- a/lib/Travel/Status/DE/DeutscheBahn.pm +++ b/lib/Travel/Status/DE/DeutscheBahn.pm @@ -6,7 +6,7 @@ use 5.014; use parent 'Travel::Status::DE::HAFAS'; -our $VERSION = '5.01'; +our $VERSION = '5.02'; sub new { my ( $class, %opt ) = @_; @@ -49,7 +49,7 @@ monitor operated by Deutsche Bahn =head1 VERSION -version 5.01 +version 5.02 =head1 DESCRIPTION diff --git a/lib/Travel/Status/DE/HAFAS.pm b/lib/Travel/Status/DE/HAFAS.pm index cd0afa185da1b190e315dda324288d556623019c..cac4da34252eb8e380aacf8684d3c2bd15b3779a 100644 --- a/lib/Travel/Status/DE/HAFAS.pm +++ b/lib/Travel/Status/DE/HAFAS.pm @@ -20,7 +20,7 @@ use Travel::Status::DE::HAFAS::Message; use Travel::Status::DE::HAFAS::Polyline qw(decode_polyline); use Travel::Status::DE::HAFAS::StopFinder; -our $VERSION = '5.01'; +our $VERSION = '5.02'; # {{{ Endpoint Definition @@ -964,7 +964,7 @@ monitors =head1 VERSION -version 5.01 +version 5.02 =head1 DESCRIPTION diff --git a/lib/Travel/Status/DE/HAFAS/Journey.pm b/lib/Travel/Status/DE/HAFAS/Journey.pm index 9e12211e077eca09c473f142a05ce1a1b1431abc..f09a3678f9c3bf782f2c2cef972c7f4479af8f68 100644 --- a/lib/Travel/Status/DE/HAFAS/Journey.pm +++ b/lib/Travel/Status/DE/HAFAS/Journey.pm @@ -11,7 +11,7 @@ use DateTime::Format::Strptime; use List::Util qw(any); use Travel::Status::DE::HAFAS::Stop; -our $VERSION = '5.01'; +our $VERSION = '5.02'; Travel::Status::DE::HAFAS::Journey->mk_ro_accessors( qw(datetime sched_datetime rt_datetime @@ -400,7 +400,7 @@ journey received by Travel::Status::DE::HAFAS =head1 VERSION -version 5.01 +version 5.02 =head1 DESCRIPTION diff --git a/lib/Travel/Status/DE/HAFAS/Location.pm b/lib/Travel/Status/DE/HAFAS/Location.pm index 27706a7b87dc909668b60c0b4ce1815198b0df58..eab066ede2385fa29ec30d32537c09e2a9466711 100644 --- a/lib/Travel/Status/DE/HAFAS/Location.pm +++ b/lib/Travel/Status/DE/HAFAS/Location.pm @@ -6,7 +6,7 @@ use 5.014; use parent 'Class::Accessor'; -our $VERSION = '5.01'; +our $VERSION = '5.02'; Travel::Status::DE::HAFAS::Location->mk_ro_accessors( qw(lid type name eva state lat lon distance_m weight)); @@ -57,7 +57,7 @@ Travel::Status::DE::HAFAS::Location - A single public transit location =head1 VERSION -version 5.01 +version 5.02 =head1 DESCRIPTION diff --git a/lib/Travel/Status/DE/HAFAS/Message.pm b/lib/Travel/Status/DE/HAFAS/Message.pm index d3f4873c9300b4eac5218f29b311a0de98cff180..562a4aec69ba5c594e3ca875ec331326ba7f57c1 100644 --- a/lib/Travel/Status/DE/HAFAS/Message.pm +++ b/lib/Travel/Status/DE/HAFAS/Message.pm @@ -6,7 +6,7 @@ use 5.014; use parent 'Class::Accessor'; -our $VERSION = '5.01'; +our $VERSION = '5.02'; Travel::Status::DE::HAFAS::Message->mk_ro_accessors( qw(short type text code prio is_him ref_count)); @@ -69,7 +69,7 @@ Travel::Status::DE::HAFAS::Message - An arrival/departure-related message. =head1 VERSION -version 5.01 +version 5.02 =head1 DESCRIPTION diff --git a/lib/Travel/Status/DE/HAFAS/Polyline.pm b/lib/Travel/Status/DE/HAFAS/Polyline.pm index 427f3dbe1c342503f197969a61d4882a6ecc0b48..6f3e92172866483b10bb06ad7beb5ceb7afdf899 100644 --- a/lib/Travel/Status/DE/HAFAS/Polyline.pm +++ b/lib/Travel/Status/DE/HAFAS/Polyline.pm @@ -16,7 +16,7 @@ use 5.014; use parent 'Exporter'; our @EXPORT_OK = qw(decode_polyline); -our $VERSION = '5.01'; +our $VERSION = '5.02'; # Translated this php script # <http://unitstep.net/blog/2008/08/02/decoding-google-maps-encoded-polylines-using-php/> diff --git a/lib/Travel/Status/DE/HAFAS/Stop.pm b/lib/Travel/Status/DE/HAFAS/Stop.pm index b3bce0834365419c9aa52fc710f3afe636960d3f..c9559f0c858c5a7e54b4ed205c3a8076fd1ce62c 100644 --- a/lib/Travel/Status/DE/HAFAS/Stop.pm +++ b/lib/Travel/Status/DE/HAFAS/Stop.pm @@ -8,7 +8,7 @@ use 5.014; use parent 'Class::Accessor'; -our $VERSION = '5.01'; +our $VERSION = '5.02'; Travel::Status::DE::HAFAS::Stop->mk_ro_accessors( qw(loc @@ -183,7 +183,7 @@ Travel::Status::DE::HAFAS::Stop - Information about a HAFAS stop. =head1 VERSION -version 5.01 +version 5.02 =head1 DESCRIPTION diff --git a/lib/Travel/Status/DE/HAFAS/StopFinder.pm b/lib/Travel/Status/DE/HAFAS/StopFinder.pm index 1c32c9d156f8a1632d07abf0af1eae91a7c76272..8802973e1e77241e83fe20166bc4760e7c8bef6d 100644 --- a/lib/Travel/Status/DE/HAFAS/StopFinder.pm +++ b/lib/Travel/Status/DE/HAFAS/StopFinder.pm @@ -10,7 +10,7 @@ use Encode qw(decode); use JSON; use LWP::UserAgent; -our $VERSION = '5.01'; +our $VERSION = '5.02'; # {{{ Constructors @@ -180,7 +180,7 @@ finder services =head1 VERSION -version 5.01 +version 5.02 =head1 DESCRIPTION