Astro-STSDAS-Table

 view release on metacpan or  search on metacpan

Table/Binary.pm  view on Meta::CPAN

sub _read_next_row
{
  my $self = shift;

  my %attr = ( VecSplit => 1, 
	       ( @_ && 'HASH' eq ref($_[-1]) ? %{pop @_} : () ) );

  # store the row data in what the caller wants, or the object's buffer.
  my $row = shift || $self->{row_arr};

  # guess what? there's (possibly only sometimes) an extra row filled
  # with indefs at the end of the file! so we can't actually use
  # the end of file condition to stop reading.  ACKCKCKCCKKC!
  return undef if $self->{row} == $self->{nrows};


  my $nread = read( $self->{fh}, $self->{buf}, $self->{row_len});

  unless( $nread == $self->{row_len} )
  {
    # if it's not zero, then we've read too little, and that's a no-no



( run in 0.692 second using v1.01-cache-2.11-cpan-702932259ff )