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.24';
3 20     20   96 use strict;
  20         30  
  20         697  
4 20     20   95 use warnings;
  20         26  
  20         2598  
5              
6             sub TIEHANDLE {
7 157     157   317 my $class = shift;
8              
9 157         697 return bless {}, $class;
10             }
11              
12             sub PRINT {
13 15     15   24 my $self = shift;
14              
15             # TODO - why do we need to select STDOUT here?
16 15         41 my $old = select STDOUT;
17 15         89 $Mason::Request::current_request->print(@_);
18 15         76 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;