[svn:dbi] r14035 - dbi/trunk/lib/DBD

[email protected]
Newsgroups perl.dbi.changes
Message-ID <[email protected]>
Author: REHSACK
Date: Tue May 25 05:39:07 2010
New Revision: 14035

Modified:
   dbi/trunk/lib/DBD/File.pm

Log:
Fixing trunctate method (thanks to Tux)


Modified: dbi/trunk/lib/DBD/File.pm
==============================================================================
--- dbi/trunk/lib/DBD/File.pm	(original)
+++ dbi/trunk/lib/DBD/File.pm	Tue May 25 05:39:07 2010
@@ -912,8 +912,9 @@
 sub truncate ($$)
 {
     my ($self, $data) = @_;
-    $self->{fh}->truncate ($self->{fh}->tell ()) or
-	croak "Error while truncating " . $self->{meta}->{f_fqfn} . ": $!";
+    my $meta = $self->{meta};
+    $meta->{fh}->truncate ($meta->{fh}->tell ()) or
+	croak "Error while truncating " . $meta->{f_fqfn} . ": $!";
     return 1;
     } # truncate
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.