Browse files

Use File::Glob::bsd_glob for niceness and not worrying about spaces

  • Loading branch information...
1 parent cac0fdf commit 3fae398dd6d566818b961d2178926211e73882bf @bingos bingos committed Mar 30, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/CPANPLUS/Internals.pm
View
4 lib/CPANPLUS/Internals.pm
@@ -465,12 +465,14 @@ sub _add_to_path {
my $s = $Config{'path_sep'};
+ require File::Glob;
+
### only add if it's not added yet
for my $dir (@$dirs) {
$dir =~ s![\\/]*$!!g;
next if $ENV{PATH} =~ qr|\Q$dir\E|;
next unless -d $dir;
- next unless glob( ( ON_WIN32 ? Win32::GetShortPathName( $dir ) : $dir ) . q{/*} );
+ next unless File::Glob::bsd_glob( $dir . q{/*} );
$ENV{PATH} = join $s, $dir, $ENV{PATH};
}

0 comments on commit 3fae398

Please sign in to comment.