This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate mainline
[perl5.git] / t / lib / TieOut.pm
1 package TieOut;
2
3 sub TIEHANDLE {
4         bless( \(my $scalar), $_[0]);
5 }
6
7 sub PRINT {
8         my $self = shift;
9         $$self .= join('', @_);
10 }
11
12 sub read {
13         my $self = shift;
14         return substr($$self, 0, length($$self), '');
15 }
16
17 1;