diff options
author | Daniel Friesel <derf@finalrewind.org> | 2015-01-14 18:33:01 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2015-01-14 18:33:01 +0100 |
commit | 894267671c2a06d77bfcd5fbb53994282f74dcde (patch) | |
tree | 0458a53c71b5f35bd5447d9c02fa06a80e029b2c /lib | |
parent | 09e38ae5f0e7ec0f2a8347cf6149ded75dd36629 (diff) |
Result.pm: Rename add_* methods which are actually setters to set_*
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Travel/Status/DE/IRIS.pm | 8 | ||||
-rw-r--r-- | lib/Travel/Status/DE/IRIS/Result.pm | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/Travel/Status/DE/IRIS.pm b/lib/Travel/Status/DE/IRIS.pm index e84754d..a063c5e 100644 --- a/lib/Travel/Status/DE/IRIS.pm +++ b/lib/Travel/Status/DE/IRIS.pm @@ -217,7 +217,7 @@ sub get_realtime { } if ( not $self->{serializable} ) { - $result->add_realtime($s); + $result->set_realtime($s); } for my $e_m (@e_ms) { @@ -233,10 +233,10 @@ sub get_realtime { } } - $result->add_messages(%messages); + $result->set_messages(%messages); if ($e_tl) { - $result->add_tl( + $result->set_tl( class => $e_tl->getAttribute('f'), # D N S F unknown_t => $e_tl->getAttribute('t'), # p train_no => $e_tl->getAttribute('n'), # dep number @@ -246,7 +246,7 @@ sub get_realtime { ); } if ($e_ref) { - $result->add_ref( + $result->set_ref( class => $e_ref->getAttribute('f'), # D N S F unknown_t => $e_ref->getAttribute('t'), # p train_no => $e_ref->getAttribute('n'), # dep number diff --git a/lib/Travel/Status/DE/IRIS/Result.pm b/lib/Travel/Status/DE/IRIS/Result.pm index e6447eb..5b06555 100644 --- a/lib/Travel/Status/DE/IRIS/Result.pm +++ b/lib/Travel/Status/DE/IRIS/Result.pm @@ -182,7 +182,7 @@ sub add_dp { return $self; } -sub add_messages { +sub set_messages { my ( $self, %messages ) = @_; $self->{messages} = \%messages; @@ -190,7 +190,7 @@ sub add_messages { return $self; } -sub add_realtime { +sub set_realtime { my ( $self, $xmlobj ) = @_; $self->{realtime_xml} = $xmlobj; @@ -198,7 +198,7 @@ sub add_realtime { return $self; } -sub add_ref { +sub set_ref { my ( $self, %attrib ) = @_; $self->{train_no_transfer} = $attrib{train_no}; @@ -208,7 +208,7 @@ sub add_ref { return $self; } -sub add_tl { +sub set_tl { my ( $self, %attrib ) = @_; # TODO |