extract size from ll_db if supported
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 21 Sep 2009 15:48:52 +0000 (15:48 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 21 Sep 2009 15:48:52 +0000 (15:48 +0000)
git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@1306 07558da8-63fa-0310-ba24-9fe276d99e06

lib/WebPAC/Input.pm

index ecc6773..0eb056f 100644 (file)
@@ -473,7 +473,8 @@ because it takes into account C<offset> and C<limit>.
 
 sub size {
        my $self = shift;
-       return $self->{size};
+       $self->{ll_db}->size if $self->{ll_db}->can('size');
+       return $self->{size}; # FIXME this is buggy if open is called multiple times!
 }
 
 =head2 seek