Commit | Line | Data |
---|---|---|
39234879 | 1 | package TieOut; |
87f9c3f5 | 2 | # $Id: /mirror/googlecode/test-more-trunk/t/lib/TieOut.pm 67132 2008-10-01T01:11:04.501643Z schwern $ |
39234879 | 3 | |
4 | sub TIEHANDLE { | |
30e302f8 | 5 | my $scalar = ''; |
87f9c3f5 | 6 | bless( \$scalar, $_[0] ); |
39234879 | 7 | } |
8 | ||
9 | sub PRINT { | |
30e302f8 | 10 | my $self = shift; |
87f9c3f5 | 11 | $$self .= join( '', @_ ); |
39234879 | 12 | } |
13 | ||
1452766c | 14 | sub PRINTF { |
30e302f8 | 15 | my $self = shift; |
1452766c | 16 | my $fmt = shift; |
30e302f8 | 17 | $$self .= sprintf $fmt, @_; |
1452766c | 18 | } |
19 | ||
87f9c3f5 | 20 | sub FILENO { } |
7483b81c | 21 | |
39234879 | 22 | sub read { |
30e302f8 | 23 | my $self = shift; |
24 | my $data = $$self; | |
25 | $$self = ''; | |
26 | return $data; | |
39234879 | 27 | } |
28 | ||
29 | 1; |