diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2018-04-13 10:53:52 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2018-04-13 10:53:52 +0200 |
commit | 3abdf5f6bc073fb8120d9938d3e76da329662845 (patch) | |
tree | 996c3182b8e387fb62688d0358f9c95329f5a580 /lib/SlackBuild/Info.pm | |
parent | c7377b5c67997f3c75d3fe3dc115bfd70fffe4e9 (diff) | |
download | slackbuilder-3abdf5f6bc073fb8120d9938d3e76da329662845.tar.gz slackbuilder-3abdf5f6bc073fb8120d9938d3e76da329662845.tar.bz2 |
Improve info file parser
* lib/SlackBuild/Info.pm (new): Support line continuations.
Diffstat (limited to 'lib/SlackBuild/Info.pm')
-rw-r--r-- | lib/SlackBuild/Info.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/SlackBuild/Info.pm b/lib/SlackBuild/Info.pm index 251e9e4..796643b 100644 --- a/lib/SlackBuild/Info.pm +++ b/lib/SlackBuild/Info.pm @@ -68,6 +68,11 @@ sub new { } while (<$fd>) { chomp; + if (/\\$/) { + chop; + $_ .= <$fd>; + redo; + } s/^\s+//; next if /^(#.*)?$/; return unless /^(?<kw>[A-Za-z_][A-Za-z_0-9]*)="(?<val>.*)"$/; |