When using Test::Harness, if the environment variable HARNESS_FILELEAK_IN_DIR is set to a directory name (like /tmp), this directory is checked for leaked files.
This all nice and well, but can I use this so that make test can actually check for leaked files?
HARNESS_FILELEAK_IN_DIR=/tmp make test is not really an option, since CPAN.pm runs a bare make test. And I would like to check leaked files in different directories, depending on the .t file that is run.
Is there any way to do this? (I suppose setting $ENV{HARNESS_FILELEAK_IN_DIR} at the beginning of the test will not work.)