-#--------------------#
- package PLP::Tie::Print;
-#--------------------#
+package PLP::Tie::Print;
+
use strict;
=head1 PLP::Tie::Print
=cut
-sub TIEHANDLE {
- return bless {}, $_[0];
-}
+sub TIEHANDLE { bless \my $dummy, $_[0] }
-sub WRITE { undef; }
+sub WRITE { undef }
sub PRINT {
- my ($self, @param) = @_;
- return if @param == 1 and not length $param[0];
- PLP::sendheaders() unless $PLP::sentheaders;
- print STDOUT @param;
- select STDOUT;
+ shift;
+ return unless grep length, @_;
+ PLP::sendheaders() unless $PLP::sentheaders;
+ print STDOUT @_;
+ select STDOUT;
}
sub PRINTF {
- my ($self, @param) = @_;
- printf STDOUT @param;
- select STDOUT;
+ shift;
+ return unless length $_[0];
+ PLP::sendheaders() unless $PLP::sentheaders;
+ printf STDOUT @_;
+ select STDOUT;
}
sub READ { undef }
sub UNTIE { undef }
+sub DESTROY { undef }
+
1;