Skip Menu |

This queue is for tickets about the Net-Server CPAN distribution.

Report information
The Basics
Id: 120696
Status: open
Priority: 0/
Queue: Net-Server

Owner: Nobody in particular
Requestors: carlos.velasco [...]

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)


Subject: [Patch] Config file does not allow spaces in values
Download (untitled) / with headers
text/plain 260b
When using config file, spaces can not be used as values. However when parsing command line, spaces are allowed wrapping them with "" or '' This patch makes spaces possible and comments with # You can escape with # with \# to avoid it to be taken as comment.
Subject: Net-Server-2.008-readconfspaces-2.patch
diff -ur a/lib/Net/ b/lib/Net/ --- a/lib/Net/ 2014-05-12 17:34:07.000000000 +0200 +++ b/lib/Net/ 2017-03-23 00:21:23.850986263 +0100 @@ -1026,7 +1026,9 @@ warn "Couldn't open conf \"$file\" [$!]\n"; }; while (defined(my $line = <$fh>)) { - push @args, $1, $2 if $line =~ m/^\s* ((?:--)?\w+) (?:\s*[=:]\s*|\s+) (\S+)/x; + $line = $1 if $line =~ /(.*?)(?<!\\)#/; + $line =~ s/\\#/#/g; + push @args, $1, $2 if $line =~ m/^\s*((?:--)?\w+)(?:\s*[=:]\s*|\s+)(.+)/; } close $fh; return \@args;

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to