Skip to content

Instantly share code, notes, and snippets.

@hoelzro
Created March 16, 2013 19:43
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save hoelzro/5177985 to your computer and use it in GitHub Desktop.
use v6;
use NativeCall;
# I like Git's distinction between "porcelain" and "plumbing"
my module POSIXPlumbing {
}
class X::POSIX {
submethod BUILD() {
# XXX initialize from errno/strerror
}
}
module POSIX {
our sub getuid() returns Int is native is export(:ALL) { ... }
# XXX generate subs by name
}
our sub EXPORT(|) {
# XXX do exporting
}
use v6;
use lib 'lib';
use POSIX <getuid>;
say getuid();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment