Changeset 39

Show
Ignore:
Timestamp:
07/08/08 03:36:10 (6 years ago)
Author:
clinton
Message:

I hate you, milkman Dan.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/Mungo/Response.pm

    r38 r39  
    336336    $self->{'__OUTPUT_STARTED__'} = 1; 
    337337  } 
    338   $self->{'IO_stack'}->[-1]->print($one_true_buffer); 
     338  if (@{$self->{'IO_stack'} || []}) { 
     339      $self->{'IO_stack'}->[-1]->print($one_true_buffer); 
     340  } else { 
     341      print $one_true_buffer; 
     342  } 
     343 
    339344  $one_true_buffer = ''; 
    340345} 
     
    367372    } 
    368373  } 
    369   $self->{'IO_stack'}->[-1]->print($output); 
     374  if (@{$self->{'IO_stack'} || []}) { 
     375      $self->{'IO_stack'}->[-1]->print($output); 
     376  } else { 
     377      print $output; 
     378  } 
    370379} 
    371380sub PRINTF { 
     
    383392    } 
    384393  } 
    385   $self->{'IO_stack'}->[-1]->printf(@_); 
     394  if (@{$self->{'IO_stack'} || []}) { 
     395      $self->{'IO_stack'}->[-1]->printf(@_); 
     396  } else { 
     397      printf(@_); 
     398  } 
    386399} 
    387400sub CLOSE {