New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix IO::Path.absolute/.relative to return IO::Path #666
Conversation
http://doc.perl6.org/type/IO::Path technically says `a new IO::Path`, so someone more familiar with the path caching may want to take it one step further.
|
The speculations use a Str return type for .absolute and .relative. Though I'd personally like these methods to return IO::Path objects for consistency if nothing else, this would be a backwards incompatible change that should not be made lightly this side of christmas. So I'd say we first have to figure out, how to implement a 6.d version where this change can be included. |
|
abspath would seem to serve no purpose in that case as both return the same string with 0 arguments |
|
abspath is also missing from the speculations. Probably because it's redundant and an implementation detail really. |
|
I'm surprised (and somewhat horrified) it does this :-( |
|
IRC discussion: http://irclog.perlgeek.de/perl6/2016-08-04#i_12967325 |
|
Old bug report: https://rt.perl.org/Ticket/Display.html?id=126262 |
|
Rejecting this. The -- IO grant |
I would disagree. For one I would expect their stringification to be different (and consider this useful). |
|
Stringification with methods other than .absolute/.relative does not take $!CWD into account, so these methods are the only ones you can use for that purpose, if you wish to reliably use the stringified results as paths to access some filesystem entity. It might've been better to make |
http://doc.perl6.org/type/IO::Path technically says
a new IO::Path, so someone more familiar with the path caching may want to take it one step further.