See Safe, Safe::World, the default rules prohibit system commands
#!/usr/bin/perl -- use Safe; my $safe = Safe->new; for my $val ( qw/ bye hi / ){ local $_ = $val; my $ret = $safe->reval(q{ return 1 if /bye/; return 0 if /hi/; }); print "$val => $ret\n"; } $safe->reval(q{ system(); }) or die $@; __END__ bye => 1 hi => 0 'system' trapped by operation mask at (eval 9) line 1.
See also (i'm guessing) workflow implementation with perl
In reply to Re: Very simple rules implementation
by Anonymous Monk
in thread Very simple rules implementation
by oniric
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |