Skip to content

Commit 5bba3c9

Browse files
author
Morgan Haskel
committed
Merge pull request #841 from PierreR/patch-1
Clean-up hash lookup and avoid local undef var
2 parents d81d173 + c24e2fa commit 5bba3c9

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

manifests/mod.pp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@
1818

1919
# Determine if we have special lib
2020
$mod_libs = $::apache::params::mod_libs
21-
$mod_lib = $mod_libs[$mod] # 2.6 compatibility hack
2221
if $lib {
2322
$_lib = $lib
24-
} elsif $mod_lib {
25-
$_lib = $mod_lib
23+
} elsif has_key($mod_libs, $mod) { # 2.6 compatibility hack
24+
$_lib = $mod_libs[$mod]
2625
} else {
2726
$_lib = "mod_${mod}.so"
2827
}
@@ -48,11 +47,10 @@
4847

4948
# Determine if we have a package
5049
$mod_packages = $::apache::params::mod_packages
51-
$mod_package = $mod_packages[$mod] # 2.6 compatibility hack
5250
if $package {
5351
$_package = $package
54-
} elsif $mod_package {
55-
$_package = $mod_package
52+
} elsif has_key($mod_packages, $mod) { # 2.6 compatibility hack
53+
$_package = $mod_packages[$mod]
5654
} else {
5755
$_package = undef
5856
}

0 commit comments

Comments
 (0)