X-Git-Url: http://git.shiar.nl/perl/plp/.git/blobdiff_plain/693387f6e6cf5efde73b10242253bb38baf1612a..072e8bc0a42031722a1c5005ebc6aa304e43c0a8:/PLP/Tie/Print.pm diff --git a/PLP/Tie/Print.pm b/PLP/Tie/Print.pm index 3d5027a..ef537a0 100644 --- a/PLP/Tie/Print.pm +++ b/PLP/Tie/Print.pm @@ -12,24 +12,24 @@ This module is part of the PLP Internals and probably not of much use to others. =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 } @@ -42,5 +42,7 @@ sub CLOSE { undef } sub UNTIE { undef } +sub DESTROY { undef } + 1;