Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: Riga
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 16 lines (13 sloc) 0.398 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
sub restricted($what) {
    die "$what is disallowed in safe mode"
}

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') }

my class IO { }
IO.^add_fallback(
    -> $, $ { True },
    -> $, $ { restricted('IO') });
Something went wrong with that request. Please try again.