X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2Fevil.pm;h=56f782470024dbb4f96fc105c7a44ed09285c1d2;hb=c72607e1a24d4e5172664949faf7d7abfa58b176;hp=db7968d102edd2ca1f1275b9ba522d966366dc0d;hpb=f17ddf12391d7c4d9a6afa6cde502c9bca8868cc;p=acme-evil.git diff --git a/lib/evil.pm b/lib/evil.pm index db7968d..56f7824 100644 --- a/lib/evil.pm +++ b/lib/evil.pm @@ -19,8 +19,10 @@ sub import { sub unimport { my $strict_arg = grep /^:strict$/, @_; - carp 'no evil; interpreted as no evil ":strict". This will change in a future version of Acme::Evil' unless $strict_arg; - $strict = 1; # To be changed when other modes are implemented + my $disable_arg = grep /^:disable/, @_; + carp 'no evil; interpreted as no evil ":strict". This will change in a future version of Acme::Evil' unless $strict_arg || $disable_arg; + $strict = 1 unless $disable_arg; # To be changed when other modes are implemented + $strict = 0 if $disable_arg; if ($strict && %tainted) { croak "Evil module already loaded. Cannot enforce \"no evil ':strict'\""; } @@ -77,6 +79,11 @@ The calling module function properly if malignant code is loaded anywhere in the program. Throws an exception if an evil module is loaded, whether at the moment of calling this pragma or in the future. +=item no B ':disable'; + +Removes the effect of any previous C ':strict'>. In other +words evil modules will now be allowed to be loaded. + =item no B ':intermediate'; (TODO) Not yet implemented. The calling module cannot function properly if it