=item fast_abs_path
- my $abs_path = abs_path($file);
+ my $abs_path = fast_abs_path($file);
A more dangerous, but potentially faster version of abs_path.
unless(defined &cwd) {
# The pwd command is not available in some chroot(2)'ed environments
- if($^O eq 'MacOS' || grep { -x "$_/pwd" } split(':', $ENV{PATH})) {
+ if( $^O eq 'MacOS' || (defined $ENV{PATH} &&
+ grep { -x "$_/pwd" } split(':', $ENV{PATH})) )
+ {
*cwd = \&_backtick_pwd;
}
else {