Catalyst::Helper::Model::Xapian - Helper for Xapian Model


Catalyst-Model-Xapian documentation Contained in the Catalyst-Model-Xapian distribution.

Index


Code Index:

NAME

Top

Catalyst::Helper::Model::Xapian - Helper for Xapian Model

SYNOPSIS

Top

    script/create.pl model Xapian Xapian index

DESCRIPTION

Top

Helper for Xapian Model.

METHODS

mk_compclass

Makes a Xapian Model class for you.

mk_comptest

Makes tests.

SEE ALSO

Top

Catalyst::Manual, Catalyst::Test, Catalyst::Request, Catalyst::Response, Catalyst::Helper, Catalyst::Model::Xapian

AUTHOR

Top

Marcus Ramberg <mramberg@cpan.org>

LICENSE

Top

This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.


Catalyst-Model-Xapian documentation Contained in the Catalyst-Model-Xapian distribution.
package Catalyst::Helper::Model::Xapian;

use strict;
use File::Spec;

sub mk_compclass {
    my ( $self, $helper, $index ) = @_;
    $helper->{index} = $index || '';
    my $file = $helper->{file};
    $helper->render_file( 'xapianclass', $file );
}

sub mk_comptest {
    my ( $self, $helper ) = @_;
    my $test = $helper->{test};
    $helper->render_file( 'xapiantest', $test );
}

1;
__DATA__

1;
__xapiantest__
use Test::More tests => 2;
use_ok( Catalyst::Test, '[% app %]' );
use_ok('[% class %]');