#!/usr/bin/perl
use strict;
use warnings;
use Filter::Simple;
BEGIN { Filter::Simple::gen_filter_import(__PACKAGE__, sub {
s/BANG\s+BANG/die 'BANG' if \$BANG/g;
})->(); }
our $BANG = 1;
BANG BANG;
Source filters normally have to be manually loaded into each module, on a case-by-case basis. How do you automatically shove it into every module?
Two tricks needed for this:
TODO....
Other examples of CPAN modules that do this includes: Acme::use::strict::with::pride, PAR::PAR