(PUP-3336) Be consistent about a single libdir
Previously, it was possible to set Puppet[:libdir] to a list of
directories, so that the autoloader's search path could be expanded.
That behavior was added in f9e05a806.
That said, it only worked when using puppet as a library, most commonly
when executing tests for modules that depend on each other. If you ever
tried to actually run puppet with :libdir containing multiple
directories, puppet would try to manage/create the directory,
interpreting it as a single directory, and would fail with:
$ puppet apply -e "notice 'hi'" --libdir /tmp/a:/tmp/b Cannot create /tmp/a:/tmp/b; parent directory /tmp/a:/tmp does not exist
This commit modifies the autoloader so that it no longer splits the
:libdir setting, consistent with other parts of puppet that assume
it's a single directory, e.g. the :libdir hook that updates $LOAD_PATH
and loading augeas lenses.
To accomplish the behavior that existed previously, it is better to
update the ruby $LOAD_PATH to include whatever additional directories
are necessary. This way the autoloader can load module specific code as
well as helper code within the module, or in different modules.