Catalyst::Helper::Model::SWISH - Helper for Catalyst::Model::SWISH


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

Index


Code Index:

NAME

Top

Catalyst::Helper::Model::SWISH - Helper for Catalyst::Model::SWISH

SYNOPSIS

Top

    script/create.pl model SWISH SWISH index

DESCRIPTION

Top

Helper for SWISH Model.

METHODS

mk_compclass

Makes a SWISH Model class for you.

mk_comptest

Makes tests.

SEE ALSO

Top

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

AUTHOR

Top

Peter Karman <perl@peknet.com>

LICENSE

Top

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


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

use strict;
use File::Spec;

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

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

1;
__DATA__

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