PART 3: Information on Changes Due to IO Grant Work
2017-04-17
The IO grant work is at its wrap up. This note lists some of the last-minute changes to the plans delineated in earlier communications ([1], [2], [3]). Most of the listed items do not require any changes to users' code.
- We implemented
IO::Path.sibling
- The promised
IO::Path.concat-with
was instead added as the much shorterIO::Path.add
. Due to large ecosystem usage,IO::Path.child
was left as is for now. The secure version is already written and.child
will be swapped to use it later on; possibly around 6.d time. This will allow more time for users to update to the.add
routine, where the secureness isn't needed. &mkdir
multi candidate that takes a list of directories has been removed. IO::Path.mkdir has been changed to return the invocant on success, to mirror the subroutine form's behaviour- The changes to
&symlink
and&link
affectedIO::Path.symlink
andIO::Path.link
as well. The new order of arguments is$existing-thing.symlink: $the-new-thing-we're-creating
(same for.link
) role IO
was promised to be removed. Essentially it was, none of the types that did it do it anymore. However, the role was brought back, to be done byIO::Path
andIO::Special
. The role provides no methods, but when we'll make our coercers type-check the results of the coercion, we'll needIO::Path
to be of typeIO
, or all of our shinyIO()
coercers will explode. AsIO::Special
is meant to be a fake-IO::Path-lite, it doesIO
role as well.- Many of the IO routines were changed from taking
Str
arguments to takingIO()
arguments (Str
coerces toIO
just fine, so no changes to code are needed on your part). When paths are given asIO::Path
s, this avoids needless waste of cycles to convert theIO::Path
toStr
and then toIO::Path
again. More importantly, sinceIO::Path.Str
doesn't consider$.CWD
into account, this fixes all potential bugs where theIO::Path
given as arg was created with$.CWD
other than current$*CWD
Help and More Info
If you need help or more information, please join our IRC channel and ask there. You can also contact the person performing this work via Twitter @zoffix or by talking to user Zoffix
in our dev IRC channel