Fennec::Finder(3) Create one .t file to find all .pm test files.


Originally Fennec made use of a runner loaded in t/Fennec.t that sought out test files (modules) to run. This modules provides similar, but greatly simplified functionality.



use strict;
use warnings;
use Fennec::Finder;

This will find all .pm and .ft files under t/ and load them. Any that contain Fennec tests will register themselves to be run once run() is called.

Warning, if you have .pm files in t/ that are not tests they will also be loaded, if any of these have interactions with the packages you are testing you must account for them.



When you "use Fennec::Finder;" the './t/' directory will be searched if it exists, otherwise the './' directory will be used. You may optionally provide alternate paths at use time: "use Fennec::Finder './Fennec', './SomeDir';"

    use strict;
    use warnings;
    use Fennec::Finder './Fennec', './SomeDir';


If you wish to customize which files are loaded you may subclass Fennec::Finder and override the "validate_file( $file )" method. This method takes the filename to verify as an argument. Return true if the file should be loaded, false if it should not. Currently the only check is that the filename ends with a ".pm".


Chad Granum [email protected]


Copyright (C) 2013 Chad Granum

Fennec is free software; Standard perl license.

Fennec is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.