Skip to content

Commit

Permalink
[Safe.pm] remove debugging statement; add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed May 27, 2009
1 parent 5e132db commit b6640c2
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion lib/Safe.pm
@@ -1,5 +1,27 @@
=begin pod
=head1 NAME
Safe - simplistic, crude Safe mode for Rakudo
=head1 Synopsis
BEGIN { @*INC.push: 'lib' }
use Safe;
# rest of your code here, which can't use
# run(), qx/../ or open()
# (at least not easily)
=head1 Description
C<Safe> crudely disables the most dangerous commands in Rakudo, right now
C<run()>, C<qx/.../> and the C<open()> function (opening sockets is still
allowed, though). Don't rely on it now, embedded PIR might still do very nasty
things.
=end pod

module Safe {
say "in module Safe";
my $s = -> *@a, *%h { die "operation not permitted in safe mode" };
Q:PIR {
$P0 = get_hll_namespace
Expand Down

0 comments on commit b6640c2

Please sign in to comment.