Start anew
[git/jnareb-git.git] / lib / perl5 / 5.6.1 / msys / ops.pm
blob9b553b76347faa69007f23af37cc460f1c2f6c5b
1 package ops;
3 use Opcode qw(opmask_add opset invert_opset);
5 sub import {
6 shift;
7 # Not that unimport is the prefered form since import's don't
8 # accumulate well owing to the 'only ever add opmask' rule.
9 # E.g., perl -Mops=:set1 -Mops=:setb is unlikely to do as expected.
10 opmask_add(invert_opset opset(@_)) if @_;
13 sub unimport {
14 shift;
15 opmask_add(opset(@_)) if @_;
20 __END__
22 =head1 NAME
24 ops - Perl pragma to restrict unsafe operations when compiling
26 =head1 SYNOPSIS
28 perl -Mops=:default ... # only allow reasonably safe operations
30 perl -M-ops=system ... # disable the 'system' opcode
32 =head1 DESCRIPTION
34 Since the ops pragma currently has an irreversible global effect, it is
35 only of significant practical use with the C<-M> option on the command line.
37 See the L<Opcode> module for information about opcodes, optags, opmasks
38 and important information about safety.
40 =head1 SEE ALSO
42 Opcode(3), Safe(3), perlrun(3)
44 =cut