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
v3.18 release
[perl/plp/.git]
/
PLP
/
Tie
/
Print.pm
diff --git
a/PLP/Tie/Print.pm
b/PLP/Tie/Print.pm
index 0647f7c10826200f1ab2e3f6aed81f4b9387ac0f..8ec4e4a389fd30c8636366ec1198364806fe4aca 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,25
@@
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) = @_
;
- return if @
param == 1 and not length $param
[0];
+
shift
;
+ return if @
_ == 1 and not length $_
[0];
PLP::sendheaders() unless $PLP::sentheaders;
PLP::sendheaders() unless $PLP::sentheaders;
- print STDOUT @
param
;
+ print STDOUT @
_
;
select STDOUT;
}
sub PRINTF {
select STDOUT;
}
sub PRINTF {
-
my ($self, @param) = @_
;
- printf STDOUT @
param
;
+
shift
;
+ printf STDOUT @
_
;
select STDOUT;
}
select STDOUT;
}
@@
-41,5
+40,7
@@
sub CLOSE { undef }
sub UNTIE { undef }
sub UNTIE { undef }
+sub DESTROY { undef }
+
1;
1;