aboutsummaryrefslogtreecommitdiff
path: root/SBO-Lib/lib
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2017-01-21 02:34:49 +0100
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2017-01-21 02:34:49 +0100
commit56dd27586e28ef80850e83601f26e01a95a7110b (patch)
tree790ccf722e13ea8cae87333cd96003684d2221fc /SBO-Lib/lib
parentf7d86ea0b119856aff7a6502a99918cfb3358197 (diff)
downloadsbotools2-56dd27586e28ef80850e83601f26e01a95a7110b.tar.xz
Fix .info parsing - again. This fixes #55
Diffstat (limited to 'SBO-Lib/lib')
-rw-r--r--SBO-Lib/lib/SBO/Lib/Info.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/SBO-Lib/lib/SBO/Lib/Info.pm b/SBO-Lib/lib/SBO/Lib/Info.pm
index f117be6..03e740a 100644
--- a/SBO-Lib/lib/SBO/Lib/Info.pm
+++ b/SBO-Lib/lib/SBO/Lib/Info.pm
@@ -216,9 +216,10 @@ sub parse_info {
my $pos = 0;
my %ret;
- while ($info_str =~ /\G([A-Za-z0-9_]+)="([^"]*)"\s*\n/g) {
- my $key = $1;
- my @val = split " ", $2;
+ while ($info_str =~ /\G([A-Za-z0-9_]+)="([^"]*)"\s*(?:\n|\z)/g) {
+ my ($key, $val) = ($1, $2);
+ $val =~ s/\\[ \t]*$/ /mg;
+ my @val = split " ", $val;
@val = '' unless @val;
$ret{$key} = \@val;
$pos = pos($info_str);