This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Module-CoreList-5.20150912 is on the CPAN
[perl5.git] / cpan / ExtUtils-Command / t / lib / TieOut.pm
CommitLineData
ca2a24a9
NC
1package TieOut;
2
3sub TIEHANDLE {
4 my $scalar = '';
5 bless( \$scalar, $_[0]);
6}
7
8sub PRINT {
9 my $self = shift;
10 $$self .= join('', @_);
11}
12
13sub PRINTF {
14 my $self = shift;
15 my $fmt = shift;
16 $$self .= sprintf $fmt, @_;
17}
18
19sub FILENO {}
20
21sub read {
22 my $self = shift;
23 my $data = $$self;
24 $$self = '';
25 return $data;
26}
27
281;