This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Break out B::Debug into its own directory in ext.
[perl5.git] / t / lib / TieIn.pm
CommitLineData
479d2113
MS
1package TieIn;
2
3sub TIEHANDLE {
4 bless( \(my $scalar), $_[0]);
5}
6
7sub write {
8 my $self = shift;
9 $$self .= join '', @_;
10}
11
12sub READLINE {
13 my $self = shift;
14 $$self =~ s/^(.*\n?)//;
15 return $1;
16}
17
18sub EOF {
19 my $self = shift;
20 return !length $$self;
21}
22
231;