Changeset 24669

Show
Ignore:
Timestamp:
27.09.2011 12:46:15 (8 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

Files:
1 modified

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