diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-11-29 15:42:54 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-11-29 15:42:54 +0100 |
commit | c4cc115ec6434b7245a710ecba99dc11d16ae1d1 (patch) | |
tree | f2e244b7d7f1f9b5cf7f739a5221470f071617d5 /lib/Travel/Routing/DE/VRR.pm | |
parent | 9aa1eab9c3fca4713ae67acab23d9b65e96ace9b (diff) |
add tests for XML parsing
Diffstat (limited to 'lib/Travel/Routing/DE/VRR.pm')
-rw-r--r-- | lib/Travel/Routing/DE/VRR.pm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Travel/Routing/DE/VRR.pm b/lib/Travel/Routing/DE/VRR.pm index 56aa28e..afa2ffe 100644 --- a/lib/Travel/Routing/DE/VRR.pm +++ b/lib/Travel/Routing/DE/VRR.pm @@ -395,6 +395,18 @@ sub new { return $ref; } +sub new_from_xml { + my ( $class, %opt ) = @_; + + my $self = { xml_reply => $opt{xml} }; + + bless( $self, $class ); + + $self->parse(); + + return $self; +} + sub submit { my ( $self, %conf ) = @_; |