summaryrefslogtreecommitdiffstats
path: root/lib/Language/TECO.pm
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2008-05-22 15:41:42 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2008-05-22 15:41:42 -0500
commita776c55b160c99e1c507c0c08227b692cfe1b31a (patch)
treea433e4d54a2f5a4b2d41eddc04e45c1bd90cad6b /lib/Language/TECO.pm
parentd466b70df09f9110d412717aad0ff21c34677e89 (diff)
downloadlanguage-teco-a776c55b160c99e1c507c0c08227b692cfe1b31a.tar.gz
language-teco-a776c55b160c99e1c507c0c08227b692cfe1b31a.zip
make execute return anything that would be printed to stdout, rather than printing it directly
Diffstat (limited to 'lib/Language/TECO.pm')
-rw-r--r--lib/Language/TECO.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Language/TECO.pm b/lib/Language/TECO.pm
index 7d2d63e..4aee5a3 100644
--- a/lib/Language/TECO.pm
+++ b/lib/Language/TECO.pm
@@ -90,6 +90,7 @@ sub push_cmd {
sub execute {
my $self = shift;
$self->{command} = shift;
+ my $ret = '';
while ($self->{command}) {
$_ = substr($self->{command}, 0, 1, '');
@@ -215,11 +216,13 @@ sub execute {
$self->num(1);
}
my $num = $self->num;
- $self->{buffer}->print($self->{buffer}->get_line_offset($num));
+ $ret .= $self->{buffer}->print($self->{buffer}->get_line_offset($num));
}
});
}
}
+
+ return $ret;
}
=head1 NAME