1b39c5158Smillertpackage TieIn; 2b39c5158Smillert 3*256a93a4Safresh1use strict; 4*256a93a4Safresh1use warnings; 5*256a93a4Safresh1 6b39c5158Smillertsub TIEHANDLE { 7b39c5158Smillert bless( \(my $scalar), $_[0]); 8b39c5158Smillert} 9b39c5158Smillert 10b39c5158Smillertsub write { 11b39c5158Smillert my $self = shift; 12b39c5158Smillert $$self .= join '', @_; 13b39c5158Smillert} 14b39c5158Smillert 15b39c5158Smillertsub READLINE { 16b39c5158Smillert my $self = shift; 17b39c5158Smillert $$self =~ s/^(.*\n?)//; 18b39c5158Smillert return $1; 19b39c5158Smillert} 20b39c5158Smillert 21b39c5158Smillertsub EOF { 22b39c5158Smillert my $self = shift; 23b39c5158Smillert return !length $$self; 24b39c5158Smillert} 25b39c5158Smillert 26b39c5158Smillert1; 27