Ignore:
Timestamp:
2011-09-27T12:46:15+13:00 (13 years ago)
Author:
jmt12
Message:

Added a test before trying to twiddle binmode on the infodb_handle to ensure it is actually a handle, and not a reference to an object like what it returned by MSSQL and GDBMServer drivers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/perllib/basebuildproc.pm

    r24626 r24669  
    195195
    196196    $self->{'output_handle'} = $handle;
    197     binmode($handle,":utf8");
     197    # Sigh - the output handle isn't always an actual handle. In a couple of
     198    # the database drivers (MSSQL and GDBMServer) it's actually a reference
     199    # to an object. So we need to test the type before setting the binmode
     200    # [jmt12]
     201    if (ref $handle eq "GLOB")
     202    {
     203      binmode($handle,":utf8");
     204    }
    198205}
    199206
Note: See TracChangeset for help on using the changeset viewer.