Making the Functions module more resilient
We were previously storing the module name with
the environment instances as the key, which meant
if the environment instances were removed, we could
never get those modules again. Given that the
functions weren't reloaded, this meant the functions
were gone if we ever reloaded the environment.
This makes the Functions environment module resilient across
environment reloads, and it also makes the method work correctly
when handed either an environment or a string.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>