From 9e399fad788f48708591f55c0660f95ec8f43f5c Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Sun, 31 May 2009 02:24:14 +0300 Subject: fix a warning on append to unsection If you want to append above the existing sections you need an empty 'section' parameter. Thus fix silences a warning in that case. --- lib/Asterisk/config.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Asterisk/config.pm b/lib/Asterisk/config.pm index 1943691..2bdd7e8 100644 --- a/lib/Asterisk/config.pm +++ b/lib/Asterisk/config.pm @@ -520,7 +520,7 @@ my $data = shift; my $class_self = shift; my @NEW; - if ($one_case->{'section'} eq '') { + if ((not exists $one_case->{'section'}) || ($one_case->{'section'} eq '')) { #Append data head of source data/foot of source data if ($one_case->{'point'} eq 'up') { push(@NEW,&_format_convert($one_case->{'data'}),@$data); -- cgit v1.2.3