diff options
author | Daniel Friesel <derf@finalrewind.org> | 2014-06-21 11:41:08 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2014-06-21 11:41:08 +0200 |
commit | 5596e5d3e42cf2e4758694dfa48a586fe268b546 (patch) | |
tree | 524840a4f916b9c8b01cc1149c753201e4b616ef /lib | |
parent | 71a6127b20d4f62146b692ca9f70dc57999bd397 (diff) |
Add serializable option to IRIS constructor (does not save libxml objects)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Travel/Status/DE/IRIS.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Travel/Status/DE/IRIS.pm b/lib/Travel/Status/DE/IRIS.pm index 79852e7..381b021 100644 --- a/lib/Travel/Status/DE/IRIS.pm +++ b/lib/Travel/Status/DE/IRIS.pm @@ -31,8 +31,9 @@ sub new { iris_base => $opt{iris_base} // 'http://iris.noncd.db.de/iris-tts/timetable', lookahead => $opt{lookahead} // ( 4 * 60 ), - station => $opt{station}, - user_agent => $ua, + serializable => $opt{serializable}, + station => $opt{station}, + user_agent => $ua, }; bless( $self, $class ); @@ -210,7 +211,9 @@ sub get_realtime { next; } - $result->add_realtime($s); + if ( not $self->{serializable} ) { + $result->add_realtime($s); + } for my $e_m (@e_ms) { my $type = $e_m->getAttribute('t'); |