Io smartmatch #15

wants to merge 2 commits into


None yet

2 participants


I implemented as many of the file test methods listed in the spec as parrot would allow.

I also re-implemented IO.l in Perl6 as opposed to pir. Finally, I fixed IO.f so that it wouldn't return Bool::True when testing device files.

worr added some commits Feb 24, 2011
@worr worr Added move to
Added chmod

Can look at filesystem permissions

Removed unnecessary functions

- Didn't need all the stuff I wrote

Implemented copy

Added additional basic IO functions

- added rm
- added link

Turns outperl6 does support octal
@worr worr Added nodev requirement to IO.f
- spec says that regular files can be neither devices or directories

Added R(), W(), X()

Added O() and o()

Changed IO.l implementation to Perl6 instead of pir

Implemented u() g() and k()

Added some globals

Added euid

Added EGID and GID

:r actually uses the EUID now instead of UID

updated :w and :x as well

Made my code a little more Windows friendly (albeit poorly)

I added some more features to this patch.

The :r, :w, and :x smartmatch operators work as expected now, checking against euid instead of just the uid like before. This also involved adding the globals $UID, $EUID, $GID, $EGID, and $*OSNAME. I tried to match the behavior of perl6, and what was discussed in the spec.

I think a better way to handle trying to access the euid/egid of the process in Windows is to throw an exception saying that that operation isn't supported on that platform. Right now, $EUID and $EGID are just 0 on windows, and :r, :w, and :x just return their real uid equivalents.

@pmichaud pmichaud closed this Aug 1, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment