diff options
-rwxr-xr-x | lib/Vyatta/Config.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Vyatta/Config.pm b/lib/Vyatta/Config.pm index a66d6c8..f929e6a 100755 --- a/lib/Vyatta/Config.pm +++ b/lib/Vyatta/Config.pm @@ -259,7 +259,7 @@ sub returnOrigValues { my $val = returnOrigValue(@_); my @values = (); if (defined($val)) { - @values = split("\n", $val); + @values = split("\n", $val); } return @values; } @@ -495,8 +495,10 @@ sub parseTmpl { if (! -r "$tpath/node.def") { return ($is_multi, $is_text); } - open(TMPL, "<$tpath/node.def") or return ($is_multi, $is_text); - foreach (<TMPL>) { + + open (my $tmpl, '<', "$tpath/node.def") + or return ($is_multi, $is_text); + foreach (<$tmpl>) { if (/^multi:/) { $is_multi = 1; } @@ -507,7 +509,7 @@ sub parseTmpl { $default = $1; } } - close TMPL; + close $tmpl; return ($is_multi, $is_text, $default); } |