ingydotnet / io-all-pm

All in One Perl IO
http://search.cpan.org/dist/IO-All/
38 stars 20 forks source link

The copy method is confusing #66

Closed frioux closed 9 years ago

frioux commented 9 years ago

The copy method is completely undocumented and seems to be an oddly named clone. I expected io->file($foo)->copy($bar) to work, but it silently "fails".

@ingydotnet, if I can get buy in from you I'd like to make copy DTRT and if it's used elsewhere, rename the old verison to clone.

ingydotnet commented 9 years ago

@frioux yeah, sounds good. Can you please just make copy be called clone and document both.

frioux commented 9 years ago

Will do.

fREW Schmidt https://blog.afoolishmanifesto.com

wchristian commented 9 years ago

As input on the copy thing, i'm noting that you have three contexts: copy with absolute paths; copy relative to current CWD; copy relative to file location.

frioux commented 9 years ago

@ingydotnet I can't get the copy method on ::Dir to instantiate a new ::Dir object, halp: https://github.com/ingydotnet/io-all-pm/tree/copy