Catalyst::Helper::Controller::CMS - Helper for CatalystX::CMS::Controller


CatalystX-CMS documentation Contained in the CatalystX-CMS distribution.

Index


Code Index:

NAME

Top

Catalyst::Helper::Controller::CMS - Helper for CatalystX::CMS::Controller

SYNOPSIS

Top

 script/myapp_create.pl controller CMS CMS

DESCRIPTION

Top

Helper for CatalystX::CMS::Controller.

METHODS

mk_compclass

Makes a CatalystX::CMS::Controller class for you.

mk_comptest

Makes tests.

SEE ALSO

Top

Catalyst::Manual, Catalyst::Test, Catalyst::Request, Catalyst::Response, Catalyst::Helper, CatalystX::CMS::Controller

AUTHOR

Top

Peter Karman <karman@cpan.org>

LICENSE

Top

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


CatalystX-CMS documentation Contained in the CatalystX-CMS distribution.
package Catalyst::Helper::Controller::CMS;

use strict;
use File::Spec;

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

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

1;
__DATA__

sub page : Path Args {
    my ($self, $c, @arg) = @_;
    $c->stash( template => $self->cms_template_for( $c, @arg ) );
}

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