X-Git-Url: http://git.shiar.net/perl/plp/.git/blobdiff_plain/ef6d542255046b6f50d7047d8e5a1d85b9f01042..1376138c9392575534de671ce7b6fbb05a578e19:/PLP/Tie/Print.pm diff --git a/PLP/Tie/Print.pm b/PLP/Tie/Print.pm index 9d0c0a9..8ec4e4a 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 @@ -9,24 +8,25 @@ Just prints to stdout, but sends headers if not sent before. tie *HANDLE, 'PLP::Tie::Print'; +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) = @_; + shift; + return if @_ == 1 and not length $_[0]; PLP::sendheaders() unless $PLP::sentheaders; - print STDOUT @param; + print STDOUT @_; select STDOUT; } sub PRINTF { - my ($self, @param) = @_; - printf STDOUT @param; + shift; + printf STDOUT @_; select STDOUT; } @@ -40,5 +40,7 @@ sub CLOSE { undef } sub UNTIE { undef } +sub DESTROY { undef } + 1;