++ed by:
Chad Granum

NAME

Fennec::Manual::CustomFennec - Customizing Fennec for you project.

DESCRIPTION

Fennec automatically loads several utilities for you. In addition it assumes you want to use Test::Builder. Subclassing Fennec will let you specify exactly what utilities you want, and what collector to use. This way you can use your subclass in each test file instead of copying use Fennec ( YOUR CONFIG OPTIONS ) into each file.

FENNEC SUBCLASS

You can subclass Fennec and override the defaults sub to your specification. The defaults sub should return a list of Fennec import argument key-pairs.

My/Fennec.pm use strict; use warnings;

    use base 'Fennec';

    sub defaults {
        my $class = shift;
        my %params = $class->SUPER::defaults;

        # Add a new autoloading utility with import arguments.
        push @{ $params->{utils} } => 'My::Util';
        $params->{'My::Util'} = [ 'util' => 'args' ];

        # Default number of concurrent procs for the test to use.
        $params->{parallel} = 3;

        return %params;
    }

    1;

CUSTOM COLLECTOR

The collector is responsible for 2 jobs: 1) In the parent process it is responsible for gathering all test results from the child processes. 2) In the child processes it is responsible for sending results to the parent process.

If TAP is not your thing, or you want to use Fennec with existing tests that do not use Test::Builder, you can create a custom collector to work for you.

Documentation for a custom Collector can be found in the Fennec::Collector POD.

AUTHORS

Chad Granum exodist7@gmail.com

COPYRIGHT

Copyright (C) 2013 Chad Granum

Fennec is free software; Standard perl license (GPL and Artistic).

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.




Hosting generously
sponsored by Bytemark