As 'perl -Mlocal::lib' now generates
"PERL_LOCAL_LIB_ROOT=$PERL_LOCAL_LIB_ROOT:~/perl5", the result of the
expansion by the shell may be ":~/perl5", so the first element of the
list created by splitting on ':' may be empty. So we have to ignore that
empty element.
my ($class) = @_;
return () unless defined $ENV{PERL_LOCAL_LIB_ROOT};
- return split /\Q$Config{path_sep}/, $ENV{PERL_LOCAL_LIB_ROOT};
+ return grep { $_ ne '' } split /\Q$Config{path_sep}/, $ENV{PERL_LOCAL_LIB_ROOT};
}
sub build_deactivate_environment_vars_for {