From 5a95601ffe613354839e0144f2e860d102c4e9f7 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Mon, 17 Nov 2014 09:37:44 +0000 Subject: [PATCH] suppress uninitialized warning on module inventory display --- Netdisco/lib/App/Netdisco/Util/Web.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Netdisco/lib/App/Netdisco/Util/Web.pm b/Netdisco/lib/App/Netdisco/Util/Web.pm index 86d48182..9cbf8669 100644 --- a/Netdisco/lib/App/Netdisco/Util/Web.pm +++ b/Netdisco/lib/App/Netdisco/Util/Web.pm @@ -176,7 +176,10 @@ sub sort_modules { # value. However, the database results are sorted by 1) parent # 2) class 3) pos 4) index so we should just be able to push onto # the array and ordering be preserved. - push(@{$modules{$module->parent}{children}{$module->class}}, $module->index); + { + no warnings 'uninitialized'; + push(@{$modules{$module->parent}{children}{$module->class}}, $module->index); + } } else { push(@{$modules{root}}, $module->index); }