Skip to content

Instantly share code, notes, and snippets.

/path.diff Secret

Created October 12, 2017 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/6c5c948865f24d1650a5d927d0b58dd3 to your computer and use it in GitHub Desktop.
Save anonymous/6c5c948865f24d1650a5d927d0b58dd3 to your computer and use it in GitHub Desktop.
@@ -77,12 +77,12 @@ sub move_to {
}
sub new {
- my $class = shift;
+ my ($class, @p) = @_;
# File systems require bytes, make sure we don't accidentally upgrade
- utf8::downgrade $_, 1 for @_;
+ utf8::downgrade $_, 1 for @p;
- my $value = @_ == 1 ? $_[0] : @_ > 1 ? catfile @_ : canonpath getcwd;
+ my $value = @p == 1 ? $p[0] : @p > 1 ? catfile @p : canonpath getcwd;
return bless \$value, ref $class || $class;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment