Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ make
- ./perl6-p --target=pir --output=src/gen/RESTRICTED.setting.pir src/RESTRICTED.setting
- ===SORRY!===
- Can only use nqp_set_sc_for_object with a SixModelObject
- *** Error code 1
- Stop.
- make: stopped in /usr/home/christian/perl6-roast-data/rakudo.parrot
- $ cat src/RESTRICTED.setting
- sub restricted($what) {
- die "$what is disallowed in restricted setting"
- }
- sub open(|) { restricted('open') }
- sub unlink(|) { restricted('unlink') }
- sub shell(|) { restricted('shell') }
- sub run(|) { restricted('run') }
- sub QX(|) { restricted('qx, qqx') }
- sub mkdir(|) { restricted('mkdir') }
- sub rmdir(|) { restricted('rmdir') }
- sub rename(|) { restricted('rename') }
- sub copy(|) { restricted('copy') }
- sub spurt(|) { restricted('spurt') }
- sub link(|) { restricted('link') }
- sub symlink(|){ restricted('symlink') }
- sub chmod(|) { restricted('chmod') }
- my class RESTRICTED is Mu {
- method FALLBACK(|) { restricted(self.^name) } # NYI, but see S12
- method new(|) { restricted(self.^name) }
- method gist(|) { restricted(self.^name) }
- }
- my class IO::Handle is RESTRICTED { }
- my class IO::Socket is RESTRICTED { }
- #?if moar
- my class Proc::Async is RESTRICTED { }
- #?endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement