File Coverage

blib/lib/Mason/TieHandle.pm
Criterion Covered Total %
statement 12 14 85.7
branch n/a
condition n/a
subroutine 4 5 80.0
pod n/a
total 16 19 84.2


line stmt bran cond sub pod time code
1             package Mason::TieHandle;
2             $Mason::TieHandle::VERSION = '2.23';
3 20     20   89 use strict;
  20         26  
  20         661  
4 20     20   82 use warnings;
  20         28  
  20         3825  
5              
6             sub TIEHANDLE {
7 157     157   322 my $class = shift;
8              
9 157         667 return bless {}, $class;
10             }
11              
12             sub PRINT {
13 15     15   25 my $self = shift;
14              
15             # TODO - why do we need to select STDOUT here?
16 15         42 my $old = select STDOUT;
17 15         84 $Mason::Request::current_request->print(@_);
18 15         80 select $old;
19             }
20              
21             sub PRINTF {
22 0     0     my $self = shift;
23              
24             # apparently sprintf(@_) won't work, it needs to be a scalar
25             # followed by a list
26 0           $self->PRINT( sprintf( shift, @_ ) );
27             }
28              
29             1;