7 my @dirs = grep { /^\// && -d } split(/:/, $ENV{PATH}), qw(
18 my %path = map { $_ => locate($_, @dirs) } @ARGV;
24 foreach my $tool (keys %path) {
25 next if not defined $path{$tool};
26 print "$tool $path{$tool}\n";
28 unlink "bin.sys/$tool";
29 symlink $path{$tool}, "bin.sys/$tool"
30 or warn "bin.sys/$tool -> $path{$tool}: $!\n";
34 my ($tool, @dirs) = @_;
36 # use die to break out of the find as soon
42 return unless $tool eq $_ and -x $_ and -f _;
43 die { found => $File::Find::name };
50 return (ref $@ eq ref {} and $@->{found}) ? $@->{found} : undef;