Add no evil ':disable'
[acme-evil.git] / lib / evil.pm
index db7968d102edd2ca1f1275b9ba522d966366dc0d..56f782470024dbb4f96fc105c7a44ed09285c1d2 100644 (file)
@@ -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<evil> ':disable';
+
+Removes the effect of any previous C<no B<evil> ':strict'>. In other
+words evil modules will now be allowed to be loaded.
+
 =item no B<evil> ':intermediate'; (TODO)
 
 Not yet implemented. The calling module cannot function properly if it
This page took 0.010224 seconds and 4 git commands to generate.