Skip to content

Commit

Permalink
Merge pull request #841 from PierreR/patch-1
Browse files Browse the repository at this point in the history
Clean-up hash lookup and avoid local undef var
  • Loading branch information
Morgan Haskel committed Nov 5, 2014
2 parents d81d173 + c24e2fa commit 5bba3c9
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions manifests/mod.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@

# Determine if we have special lib
$mod_libs = $::apache::params::mod_libs
$mod_lib = $mod_libs[$mod] # 2.6 compatibility hack
if $lib {
$_lib = $lib
} elsif $mod_lib {
$_lib = $mod_lib
} elsif has_key($mod_libs, $mod) { # 2.6 compatibility hack
$_lib = $mod_libs[$mod]
} else {
$_lib = "mod_${mod}.so"
}
Expand All @@ -48,11 +47,10 @@

# Determine if we have a package
$mod_packages = $::apache::params::mod_packages
$mod_package = $mod_packages[$mod] # 2.6 compatibility hack
if $package {
$_package = $package
} elsif $mod_package {
$_package = $mod_package
} elsif has_key($mod_packages, $mod) { # 2.6 compatibility hack
$_package = $mod_packages[$mod]
} else {
$_package = undef
}
Expand Down

0 comments on commit 5bba3c9

Please sign in to comment.