This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Added config.w32 to win32/.gitignore
[perl5.git] / t / lib / TieOut.pm
... / ...
CommitLineData
1package TieOut;
2# $Id: /mirror/googlecode/test-more-trunk/t/lib/TieOut.pm 67132 2008-10-01T01:11:04.501643Z schwern $
3
4sub TIEHANDLE {
5 my $scalar = '';
6 bless( \$scalar, $_[0] );
7}
8
9sub PRINT {
10 my $self = shift;
11 $$self .= join( '', @_ );
12}
13
14sub PRINTF {
15 my $self = shift;
16 my $fmt = shift;
17 $$self .= sprintf $fmt, @_;
18}
19
20sub FILENO { }
21
22sub read {
23 my $self = shift;
24 my $data = $$self;
25 $$self = '';
26 return $data;
27}
28
291;