$ 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.
Test::Without::Module (Score:1)
rjbs
Re: (Score:2)
Re: (Score:1)
Anyway, I look forward to seeing your solution, too.
rjbs
Re: (Score:2)
Re: (Score:2)
Also, for testing without XS (Score:1)