$ perl -Ilib -MNo=Data::Dumper -e 'use Data::Dumper'
Data::Dumper isn't allowed to load.
Compilation failed in require.
BEGIN failed--compilation aborted.
This is actually useful. Imagine you've written some code which, if some optional module is present, will do different stuff. You need to test both with and without the optional module before releasing your code. The usual way to do that is to monkey around in your perl libs and temporarily rename the appropriate
With this cunning trick, simply
use No qw(Some::Random::Module) in a test file and the effect will be as if it wasn't there.