X-Git-Url: http://git.shiar.net/gitweb.cgi/perl/plp/.git/blobdiff_plain/55b5d8b2c5b2d13e40ed37f37ef54f0e1f37af4b..6fc33d2b5bd84a3bfb1c8d393cf57e1081fcd623:/PLP/Tie/Print.pm diff --git a/PLP/Tie/Print.pm b/PLP/Tie/Print.pm index 4c6983f..ef537a0 100644 --- a/PLP/Tie/Print.pm +++ b/PLP/Tie/Print.pm @@ -1,6 +1,5 @@ -#--------------------# - package PLP::Tie::Print; -#--------------------# +package PLP::Tie::Print; + use strict; =head1 PLP::Tie::Print @@ -13,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 } @@ -43,5 +42,7 @@ sub CLOSE { undef } sub UNTIE { undef } +sub DESTROY { undef } + 1;