v3.00 release
[perl/plp/.git] / PLP / Tie / Print.pm
1 #--------------------#
2  package PLP::Tie::Print;
3 #--------------------#
4 use strict;
5
6 =head1 PLP::Tie::Print
7
8 Just prints to stdout, but sends headers if not sent before.
9
10     tie *HANDLE, 'PLP::Tie::Print';
11
12 =cut
13
14 sub TIEHANDLE {
15     return bless {}, $_[0];
16 }
17
18 sub WRITE { undef; }
19
20 sub PRINT {
21     my ($self, @param) = @_;
22     PLP::SendHeaders() unless $PLP::sentheaders;
23     print STDOUT @param;
24     select STDOUT;
25 }
26
27 sub PRINTF {
28     my ($self, @param) = @_;
29     printf STDOUT @param;
30     select STDOUT;
31 }
32
33 sub READ { undef }
34
35 sub READLINE { undef }
36
37 sub GETC { '%' }
38
39 sub CLOSE { undef }
40
41 sub UNTIE { undef }
42
43 1;
44