summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2013-01-23 15:16:46 -0500
committerMichael J. Chudobiak <mjc@avtechpulse.com>2013-01-23 15:16:46 -0500
commitedeb612f557063c4855dfd9285c6eba29b5d6906 (patch)
tree7dc22db83111eebaa4ad7949bd45e5851bdbfc2b
parentee32702cf80393192807fbee425d919e6bef6e44 (diff)
added autochomp
-rw-r--r--libvxi11client/perlbits/Client.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/libvxi11client/perlbits/Client.pm b/libvxi11client/perlbits/Client.pm
index 9405464..605d864 100644
--- a/libvxi11client/perlbits/Client.pm
+++ b/libvxi11client/perlbits/Client.pm
@@ -62,9 +62,17 @@ sub vxi_read {
waitlock => 0,
termchrset => 0,
termchr => 0,
+ autochomp => 1,
@_
);
- return vxi_read_long($self, $args{bufferlen}, $args{waitlock}, $args{termchrset},$args{termchr});
+
+ my ($bytes, $string, $reason) = vxi_read_long($self, $args{bufferlen}, $args{waitlock}, $args{termchrset},$args{termchr});
+
+ if ($args{autochomp}) {
+ chomp ($string);
+ }
+
+ return ($bytes, $string, $reason);
}
1;