NAME
evil - RFC 3514 (evil bit) implementation for Perl modules
SYNOPSIS
# in A.pm
package A;
use evil;
...
# in B.pm
package B;
no evil ':strict';
use A; # <dies>
...
DESCRIPTION
RFC3514 introduces a new flag called the "evil bit" in all IP packets. The intention is to simplify the work of firewalls. Software that sends IP packets with malicious intent must set the evil bit to true, and firewalls can simply drop such packets.
The evil pragma is a Perl implementation of the same concept. With this pragma malicious modules can declare their evil intent while critical modules can request that they will only use / run alongside non-evil code.
The pragma can be used in the following ways:
- use evil;
-
Marks the current package as evil. All malicious modules MUST use this directive to ensure the full functionality of this module.
- no evil ':strict';
-
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.
- no evil ':intermediate'; (TODO)
-
Not yet implemented. The calling module cannot function properly if it is using evil code, whether directly or indirectly. Throws an exception if an evil module is loaded by the calling module or by one of the children modules (or by one of their children modules, etc).
- no evil ':lax'; (TODO)
-
Not yet implemented. The calling module cannot function properly if it is using evil code direcly. Throws an exception if the calling module loads an evil module.
- no evil;
-
This would normally be equivalent to
no evil ':intermediate';
but since that mode is not yet implemented this call does the same asno evil ':strict';
while also emitting a warning saying that this behaviour will change in a future version.
AUTHOR
Marius Gavrilescu, <marius@ieval.ro>
COPYRIGHT AND LICENSE
Copyright (C) 2016 by Marius Gavrilescu
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.22.2 or, at your option, any later version of Perl 5 you may have available.