This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Move Getopt::Long from lib to ext.
[perl5.git]
/
t
/
lib
/
TieOut.pm
1
package TieOut;
2
3
use strict;
4
5
sub TIEHANDLE {
6
my $scalar = '';
7
bless( \$scalar, $_[0] );
8
}
9
10
sub PRINT {
11
my $self = shift;
12
$$self .= join( '', @_ );
13
}
14
15
sub PRINTF {
16
my $self = shift;
17
my $fmt = shift;
18
$$self .= sprintf $fmt, @_;
19
}
20
21
sub FILENO { }
22
23
sub read {
24
my $self = shift;
25
my $data = $$self;
26
$$self = '';
27
return $data;
28
}
29
30
1;