develooper Front page | perl.dbi.changes | Postings from December 2012

[svn:dbi] r15523 - dbi/branches/sqlengine/lib/DBD

From:
REHSACK
Date:
December 19, 2012 18:39
Subject:
[svn:dbi] r15523 - dbi/branches/sqlengine/lib/DBD
Message ID:
20121219183854.B4B90184BC5@xx12.develooper.com
Author: REHSACK
Date: Wed Dec 19 10:38:53 2012
New Revision: 15523

Modified:
   dbi/branches/sqlengine/lib/DBD/File.pm

Log:
fix DBD::File::DataSource::Stream::open_data during self-code-review while hacking some docs

Modified: dbi/branches/sqlengine/lib/DBD/File.pm
==============================================================================
--- dbi/branches/sqlengine/lib/DBD/File.pm	(original)
+++ dbi/branches/sqlengine/lib/DBD/File.pm	Wed Dec 19 10:38:53 2012
@@ -471,15 +471,8 @@
 	    croak "Cannot open $fn for reading: $! (" . ($!+0) . ")";
 	}
 
-    $meta->{fh} = $meta->{f_file};
     if ($meta->{fh}) {
-	if (my $enc = $meta->{f_encoding}) {
-	    binmode $meta->{fh}, ":encoding($enc)" or
-		croak "Failed to set encoding layer '$enc' on $fn: $!";
-	    }
-	else {
-	    binmode $meta->{fh} or croak "Failed to set binary mode on $fn: $!";
-	    }
+	$self->apply_encoding($meta, $fn);
 	} # have $meta->{$fh}
 
     if ($self->can_flock && $meta->{fh}) {



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About