X-Git-Url: http://git.shiar.net/perl/plp/.git/blobdiff_plain/1376138c9392575534de671ce7b6fbb05a578e19..a5521fb1820cc67ab3d7c0fe728ef36b0b379a3f:/PLP/Tie/Print.pm?ds=inline diff --git a/PLP/Tie/Print.pm b/PLP/Tie/Print.pm index 8ec4e4a..ef537a0 100644 --- a/PLP/Tie/Print.pm +++ b/PLP/Tie/Print.pm @@ -17,17 +17,19 @@ sub TIEHANDLE { bless \my $dummy, $_[0] } sub WRITE { undef } sub PRINT { - shift; - return if @_ == 1 and not length $_[0]; - PLP::sendheaders() unless $PLP::sentheaders; - print STDOUT @_; - select STDOUT; + shift; + return unless grep length, @_; + PLP::sendheaders() unless $PLP::sentheaders; + print STDOUT @_; + select STDOUT; } sub PRINTF { - shift; - printf STDOUT @_; - select STDOUT; + shift; + return unless length $_[0]; + PLP::sendheaders() unless $PLP::sentheaders; + printf STDOUT @_; + select STDOUT; } sub READ { undef }