X-Git-Url: http://git.shiar.net/gitweb.cgi/perl/plp/.git/blobdiff_plain/693387f6e6cf5efde73b10242253bb38baf1612a..9a1b0361b84c77b093cccf584b3b310fc2ffccd9:/PLP/Tie/Print.pm diff --git a/PLP/Tie/Print.pm b/PLP/Tie/Print.pm index 3d5027a..83b5c76 100644 --- a/PLP/Tie/Print.pm +++ b/PLP/Tie/Print.pm @@ -12,23 +12,23 @@ 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]; + shift; + return unless grep length, @_; PLP::sendheaders() unless $PLP::sentheaders; - print STDOUT @param; + print STDOUT @_; select STDOUT; } sub PRINTF { - my ($self, @param) = @_; - printf STDOUT @param; + shift; + return unless length $_[0]; + PLP::sendheaders() unless $PLP::sentheaders; + printf STDOUT @_; select STDOUT; } @@ -42,5 +42,7 @@ sub CLOSE { undef } sub UNTIE { undef } +sub DESTROY { undef } + 1;