Subject: | sub rebuild_tables broken |
Date: | Mon, 16 Mar 2009 16:29:09 +0100 |
To: | bug-Mobile-Wurfl [...] rt.cpan.org |
From: | Jonas Pasche <jonas.pasche [...] skytel.de> |
sub rebuild_tables compares the result of get_local_stats() with the
result of last_update(). Unfortunately it expects get_local_stats to
return a timestamp while in fact get_local_stats returns an _array_ of
the file size and the time stamp of wurfl.xml.
The problem can be easily fixed this way:
--- Mobile/Wurfl.pm.orig 2009-03-16 16:18:14.000000000 +0100
+++ Mobile/Wurfl.pm 2009-03-16 16:28:25.000000000 +0100
@@ -175,7 +175,7 @@
{
my $self = shift;
- my $local = $self->get_local_stats();
+ my $local = ($self->get_local_stats())[1];
my $last_update = $self->last_update();
if ( $local <= $last_update )
{