]> git.refcnt.org Git - distdns.git/commitdiff
Use quotes in option processing error messages
authorSteven Schubiger <stsc@refcnt.org>
Mon, 16 Sep 2013 18:37:04 +0000 (20:37 +0200)
committerSteven Schubiger <stsc@refcnt.org>
Mon, 16 Sep 2013 18:37:04 +0000 (20:37 +0200)
client.pl
server.cgi

index c83694c3381068668600e0250afb9828625cd3c2..0563c5cf26602aba7054d500d40e83a45bffa973 100755 (executable)
--- a/client.pl
+++ b/client.pl
@@ -61,13 +61,13 @@ my $get_config_opts = sub
 {
     my ($section, $options) = @_;
 
-    _die "Section $section missing in $conf_file\n" unless exists $config->{$section};
+    _die "Section '$section' missing in $conf_file\n" unless exists $config->{$section};
 
     my %options;
     @options{@$options} = @{$config->{$section}}{@$options};
 
     foreach my $option (@$options) {
-        _die "Option $option not set in $conf_file\n" unless defined $options{$option} && length $options{$option};
+        _die "Option '$option' not set in $conf_file\n" unless defined $options{$option} && length $options{$option};
     }
 
     return @options{@$options};
index e581a8732ad922acffaa6bffd40725abef5858f6..f9f8579009c71558664a7cf0c127d5a4bc028701 100755 (executable)
@@ -62,7 +62,7 @@ my $config = Config::Tiny->new;
 
 my $section = 'path';
 
-die "Section $section missing in $conf_file\n" unless exists $config->{$section};
+die "Section '$section' missing in $conf_file\n" unless exists $config->{$section};
 
 my @options = qw(json_file session_file);
 
@@ -70,7 +70,7 @@ my %options;
 @options{@options} = @{$config->{$section}}{@options};
 
 foreach my $option (@options) {
-    die "Option $option not set in $conf_file\n" unless defined $options{$option} && length $options{$option};
+    die "Option '$option' not set in $conf_file\n" unless defined $options{$option} && length $options{$option};
 }
 
 my ($json_file, $session_file) = map rel2abs($options{$_}, $Bin), @options;