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}) {

Reply via email to