line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PLP::Tie::Print; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
308
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.00'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 PLP::Tie::Print |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Just prints to stdout, but sends headers if not sent before. |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
tie *HANDLE, 'PLP::Tie::Print'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
This module is part of the PLP Internals and probably not of much use to others. |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
17
|
|
|
|
|
|
|
|
18
|
18
|
|
|
18
|
|
86
|
sub TIEHANDLE { bless \my $dummy, $_[0] } |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
0
|
|
0
|
sub WRITE { undef } |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub PRINT { |
23
|
27
|
|
|
27
|
|
43
|
shift; |
24
|
27
|
100
|
|
|
|
543
|
return unless grep length, @_; |
25
|
18
|
100
|
|
|
|
65
|
PLP::sendheaders() unless $PLP::sentheaders; |
26
|
18
|
|
|
|
|
39
|
print STDOUT @_; |
27
|
18
|
|
|
|
|
116
|
select STDOUT; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub PRINTF { |
31
|
0
|
|
|
0
|
|
0
|
shift; |
32
|
0
|
0
|
|
|
|
0
|
return unless length $_[0]; |
33
|
0
|
0
|
|
|
|
0
|
PLP::sendheaders() unless $PLP::sentheaders; |
34
|
0
|
|
|
|
|
0
|
printf STDOUT @_; |
35
|
0
|
|
|
|
|
0
|
select STDOUT; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
0
|
|
0
|
sub READ { undef } |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
0
|
|
0
|
sub READLINE { undef } |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
0
|
|
0
|
sub GETC { '%' } |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
0
|
|
0
|
sub CLOSE { undef } |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
0
|
|
0
|
sub UNTIE { undef } |
47
|
|
|
|
|
|
|
|
48
|
17
|
|
|
17
|
|
47
|
sub DESTROY { undef } |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |
51
|
|
|
|
|
|
|
|