From: Ralf Ertzinger Date: Tue, 30 Apr 2013 17:41:33 +0000 (+0200) Subject: libvideosite: use path argument properly in _config_list_* helpers X-Git-Url: https://git.camperquake.de/gitweb.cgi?p=videosite.git;a=commitdiff_plain;h=cc26109147976931511f440bbe67618b3503766d libvideosite: use path argument properly in _config_list_* helpers --- diff --git a/libvideosite.pm b/libvideosite.pm index 4252338..52a771b 100644 --- a/libvideosite.pm +++ b/libvideosite.pm @@ -339,7 +339,7 @@ sub _config_list_add { @c = (); } - _debug("Adding %s to list %s", $item, join(".", $path)); + _debug("Adding %s to list %s", $item, join(".", @{$path})); unless(grep { $_ eq $item } @c) { push(@c, $item); }; @@ -359,7 +359,7 @@ sub _config_list_del { return; } - _debug("Removing %s from list %s", $item, join('.', $path)); + _debug("Removing %s from list %s", $item, join('.', @{$path})); @c = map { $item ne $_ } split(/\s*,\s*/, _config_get($path)); _config_set($path, join('.', @c)); @@ -376,7 +376,7 @@ sub _config_list_has { return 0; } - _debug("Checking for %s in list %s", $item, join('.', $path)); + _debug("Checking for %s in list %s", $item, join('.', @{$path})); return grep { $item eq $_ } split(/\s*,\s*/, _config_get($path)); } @@ -387,7 +387,7 @@ sub _config_list_has { sub _config_list_set { my $path = shift; - _debug("Replacing %s with (%s)", join('.', $path), join(",", @_)); + _debug("Replacing %s with (%s)", join('.', @{$path}), join(",", @_)); _config_set($path, join(',', @_)); }