Graham Barr > MojoX-Renderer-Mason-0.11 > MojoX::Renderer::Mason

Download:
MojoX-Renderer-Mason-0.11.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.11   Source  

NAME ^

MojoX::Renderer::Mason - HTML::Mason renderer for Mojo

SYNOPSIS ^

  use MojoX::Renderer::Mason;

  sub startup {
    my $self = shift;

    $self->types->type(html => 'text/html');

    my $render = MojoX::Renderer::Mason->build(
      comp_root => $self->home->rel_dir('mason'),
    );

    $self->renderer->add_handler(html => $render);
  }

DESCRIPTION ^

Once added this renderer will be called by MojoX::Renderer for any given template where the suffix of the specified template matches the suffix used in the add_handler method.

When the renderer is invoked, the contents of the stash will be passed to the template in %ARGS. Templates also have access to the context as $ctx

METHODS ^

build

This method returns a handler for the Mojo renderer.

Supported parameters are any parameter documented as valid to HTML::Mason::Interp, see HTML::Mason::Params

comp_root is a required parameter.

AUTHOR ^

Graham Barr <gbarr@cpan.org>

BUGS ^

Please report any bugs or feature requests to bug-mojox-renderer-mason at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MojoX-Renderer-Mason. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SEE ALSO ^

HTML::Mason, HTML::Mason::Params, MojoX::Renderer

COPYRIGHT & LICENSE ^

Copyright (C) 2008 Graham Barr

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.