Skip to content

Commit

Permalink
avoid a prototype warning assigning \&getcwd to *cwd
Browse files Browse the repository at this point in the history
This would produce a warning if we fallback to using getcwd() where
getcwd() has a prototype.
  • Loading branch information
tonycoz committed Jun 9, 2021
1 parent a52672c commit 44e4059
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dist/PathTools/Cwd.pm
Expand Up @@ -212,7 +212,8 @@ unless ($METHOD_MAP{$^O}{cwd} or defined &cwd) {
*cwd = \&_backtick_pwd;
}
else {
*cwd = \&getcwd;
# getcwd() might have an empty prototype
*cwd = sub { getcwd(); };
}
}

Expand Down

0 comments on commit 44e4059

Please sign in to comment.