git.shiar.nl
/
perl
/
plp
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
seperate modules for backend-specific code
[perl/plp/.git]
/
PLP
/
Tie
/
Print.pm
diff --git
a/PLP/Tie/Print.pm
b/PLP/Tie/Print.pm
index 7563ba5963760e78724d960d1f6064979e73fbe7..ef537a03a10a6a6bc7739fd87bfc4981d478340d 100644
(file)
--- 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
use strict;
=head1 PLP::Tie::Print
@@
-9,25
+8,28
@@
Just prints to stdout, but sends headers if not sent before.
tie *HANDLE, 'PLP::Tie::Print';
tie *HANDLE, 'PLP::Tie::Print';
+This module is part of the PLP Internals and probably not of much use to others.
+
=cut
=cut
-sub TIEHANDLE {
- return bless {}, $_[0];
-}
+sub TIEHANDLE { bless \my $dummy, $_[0] }
-sub WRITE { undef
;
}
+sub WRITE { undef }
sub PRINT {
sub PRINT {
- my ($self, @param) = @_;
- 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 {
}
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 }
}
sub READ { undef }
@@
-40,5
+42,7
@@
sub CLOSE { undef }
sub UNTIE { undef }
sub UNTIE { undef }
+sub DESTROY { undef }
+
1;
1;