"because cpan/m do not support uninstallation of modules"
```
$ cpanm --help
...
  -U,--uninstall            Uninstalls the modules (EXPERIMENTAL)
...
```
Is that so? ;)

That said--for testing, you can also make cpanm use a pretend local-lib in t/ and then remove it when you are done. Add an %ENV variable or some such thing to give cpanm options.