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-withwas instead added as the much shorterIO::Path.add. Due to large ecosystem usage,IO::Path.childwas left as is for now. The secure version is already written and.childwill be swapped to use it later on; possibly around 6.d time. This will allow more time for users to update to the.addroutine, where the secureness isn't needed. &mkdirmulti 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
&symlinkand&linkaffectedIO::Path.symlinkandIO::Path.linkas well. The new order of arguments is$existing-thing.symlink: $the-new-thing-we're-creating(same for.link) role IOwas 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::PathandIO::Special. The role provides no methods, but when we'll make our coercers type-check the results of the coercion, we'll needIO::Pathto be of typeIO, or all of our shinyIO()coercers will explode. AsIO::Specialis meant to be a fake-IO::Path-lite, it doesIOrole as well.- Many of the IO routines were changed from taking
Strarguments to takingIO()arguments (Strcoerces toIOjust fine, so no changes to code are needed on your part). When paths are given asIO::Paths, this avoids needless waste of cycles to convert theIO::PathtoStrand then toIO::Pathagain. More importantly, sinceIO::Path.Strdoesn't consider$.CWDinto account, this fixes all potential bugs where theIO::Pathgiven as arg was created with$.CWDother 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
