NAME

Fennec::Manual::Files - Writing Custom File Loaders.

SYNOPSIS

package Fennec::FileType::MyType;
use strict;
use warnings;

use base 'Fennec::FileType';

sub valid_file {
    my $class = shift;
    my ( $file ) = @_;
    ...
    return $bool;
}

sub load_file {
    my $self = shift;
    my $file = $self->filename;
    ...
    return $package;
}

sub paths {qw( t/ ... )}

1;

METHODS

You must implement the following methods.

$bool = $class->valid_file( $filename )

Return true if the given filename is a valid file of the type you expect.

$package = $obj->load_file()

Must load the test file. This must also make sure that a package name is generated for the file. When finished the method must return the name of the package for the test file. This package must also be a subclass of Fennec::TestFile.

@list = $obj->paths()

A list of paths, relative to the project root, in which to search for test files.

AUTHORS

Chad Granum exodist7@gmail.com

COPYRIGHT

Copyright (C) 2010 Chad Granum

Fennec is free software; Standard perl licence.

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.