Changeset 27570


Ignore:
Timestamp:
2013-06-07T10:53:10+12:00 (11 years ago)
Author:
jmt12
Message:

Make the warning about binmode() not being applicable more meaningful, and display it only once

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/perllib/FileUtils/HDThriftFS/ThriftFH.pm

    r27384 r27570  
    5050  $self->{'mode'} = 'r';
    5151  $self->{'read_offset'} = 0; # A read offset
     52  $self->{'warnings'} = {'binmode' => 0};
    5253  return bless $self, $class;
    5354}
     
    241242  return $self;
    242243}
    243 ## open()
    244 
    245 
     244## open() ##
     245
     246
     247## @function binmode()
     248#
    246249sub BINMODE
    247250{
    248   print STDERR "ThriftFH::BINMODE() - implement me!\n";
    249 }
    250 
     251  # Have we warned about BIN mode not being applicable?
     252  if ($self->{'warnings'}->{'binmode'} != 1)
     253  {
     254    print STDERR "Notice! BIN mode not applicable in ThriftFS (all data base91 encoded)\n";
     255    # we have now!
     256    $self->{'warnings'}->{'binmode'} = 1;
     257  }
     258}
     259## BINMODE
     260
     261
     262## @function eof()
     263#
    251264sub EOF
    252265{
     
    254267  return $self->{'eof'};
    255268}
     269## eof() ##
     270
    256271
    257272sub TELL
Note: See TracChangeset for help on using the changeset viewer.