diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-05-30 06:34:56 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-05-30 06:34:56 -0500 |
commit | 28374a3626f8808995e038993b0a19ab182791c2 (patch) | |
tree | aff7d5c9e93d3d84e2100029db55dd0312e6f116 /lib | |
parent | 8d856fdbf5d4afaff210b1fbc9b2639ae54f6464 (diff) | |
download | reply-28374a3626f8808995e038993b0a19ab182791c2.tar.gz reply-28374a3626f8808995e038993b0a19ab182791c2.zip |
better error reporting
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Reply.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Reply.pm b/lib/Reply.pm index 46e1514..66ef8a4 100644 --- a/lib/Reply.pm +++ b/lib/Reply.pm @@ -104,12 +104,13 @@ sub _read { my $prompt = $self->_wrapped_plugin('prompt'); my ($line) = $self->_wrapped_plugin('read_line', $prompt); + return if !defined $line; - if (defined($line) && $line =~ s/^#(\w+)(?:\s+|$)//) { + if ($line =~ s/^#(\w+)(?:\s+|$)//) { ($line) = $self->_chained_plugin("command_\L$1", $line); } - return $line; + return "\n#line 1 \"reply input\"\n$line"; } sub _eval { |