Subject: | Policies do not handle multiple namespaces across files very well |
In order to do this correctly, the policies would need to scan all the files, track which namespaces they've seen, and then check for violations across the namespace.
Here's an example where RequireMakeImmutable will issue a false positive (as in, it will complain about the lack of immutable for Foo):
package Foo;
use Moose;
package Bar;
package Foo;
__PACKAGE__->meta()->make_immutable()
This sort of code is extremely pathological, but it would still be nice to do the right thing if this is possible.