Commit | Line | Data |
---|---|---|
39234879 | 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 | ||
1452766c | 12 | sub PRINTF { |
13 | my $self = shift; | |
14 | my $fmt = shift; | |
15 | $$self .= sprintf $fmt, @_; | |
16 | } | |
17 | ||
39234879 | 18 | sub read { |
19 | my $self = shift; | |
1452766c | 20 | return substr($$self, 0, length($$self), ''); |
39234879 | 21 | } |
22 | ||
23 | 1; |