Catalyst::Helper::View::MicroMason - Helper for MicroMason Views


Catalyst-View-MicroMason documentation Contained in the Catalyst-View-MicroMason distribution.

Index


Code Index:

NAME

Top

Catalyst::Helper::View::MicroMason - Helper for MicroMason Views

SYNOPSIS

Top

    script/create.pl view MicroMason MicroMason

DESCRIPTION

Top

Helper for MicroMason Views.

METHODS

mk_compclass

SEE ALSO

Top

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

AUTHOR

Top

Jonas Alves, jgda@cpan.org

MAINTAINER

Top

The Catalyst Core Team http://www.catalystframework.org/

Jonathan Rockway <jrockway@cpan.org>

LICENSE

Top

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

NAME

Top

[% class %] - MicroMason View Component

SYNOPSIS

Top

In your end action:

    $c->forward('[% class %]');

DESCRIPTION

Top

A description of how to use your view, if you're deviating from the default behavior.

AUTHOR

Top

LICENSE

Top


Catalyst-View-MicroMason documentation Contained in the Catalyst-View-MicroMason distribution.
package Catalyst::Helper::View::MicroMason;

use strict;

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

1;

__DATA__

__compclass__
package [% class %];

use strict;
use base 'Catalyst::View::MicroMason';

__PACKAGE__->config(
    # -Filters      : to use |h and |u
    # -ExecuteCache : to cache template output
    # -CompileCache : to cache the templates
    Mixins => [qw( -Filters -CompileCache )], 
);
    
1; # magic true value