summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-09-11 20:25:17 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-09-11 20:25:17 +0200
commit0640f90da6e16a23fc87dd4acb32d1d3604b1267 (patch)
treef60861c94016a813c86b693443fa543a278bd575 /lib
parent50a12ddf7f67f7a7e383fe0e1962e41c24afce02 (diff)
Add actual tests
Diffstat (limited to 'lib')
-rw-r--r--lib/Travel/Status/DE/VRR.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/VRR.pm b/lib/Travel/Status/DE/VRR.pm
index e16136f..47b3b76 100644
--- a/lib/Travel/Status/DE/VRR.pm
+++ b/lib/Travel/Status/DE/VRR.pm
@@ -98,6 +98,21 @@ sub new {
return $self;
}
+sub new_from_html {
+ my ( $class, %opt ) = @_;
+
+ my $self = { html => $opt{html}, };
+
+ $self->{tree} = XML::LibXML->load_html(
+ string => $self->{html},
+ recover => 2,
+ suppress_errors => 1,
+ suppress_warnings => 1,
+ );
+
+ return bless( $self, $class );
+}
+
sub errstr {
my ($self) = @_;