name     = UnwantedDependencies
abstract = Hook demo: Check the distro does not have unwanted dependencies
version  = v0.0.1
[GenerateFile/Assa.pm]
    filename = lib/Assa.pm
    content  = package Assa; use DDP; 1;
[AutoPrereqs]
[MetaJSON]
[Hook::BeforeRelease/unwanted deps] ; <<<=== Look at this
    . = my @modules = qw{ DDP Data::Printer };  # Unwanted modules.
    . = my $prereqs = $dist->distmeta->{ prereqs };
    . = for my $m ( @modules ) {
    . =     for my $s ( qw{ configure develop runtime test } ) {
    . =         if ( exists( $prereqs->{ $s }->{ requires }->{ $m } ) ) {
    . =             $self->log_error( [ '%s found in %s prereqs', $m, $s ] );
    . =         };
    . =     };
    . = };
    . = $self->abort_if_error( 'unwanted dependencies found' );
[FakeRelease]