Graham Barr > MojoX-Renderer-YAML-0.10 > MojoX::Renderer::YAML

Download:
MojoX-Renderer-YAML-0.10.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.10   Source  

NAME ^

MojoX::Renderer::YAML - YAML renderer for Mojo

SYNOPSIS ^

  use MojoX::Renderer::YAML;

  sub startup {
    my $self = shift;

    $self->types->type(yml => 'application/x-yaml');

    my $render = MojoX::Renderer::YAML->build(
      Headless => 1,
      SortKeys => 1,
    );

    $self->renderer->add_handler(yml => $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.

This renderer converts the result element in the stash to YAML using the given options. The template name is ignored.

METHODS ^

build

This method returns a handler for the Mojo renderer.

Supported parameters are names of variables used by YAML::Syck. See YAML::Syck for their definitions

AUTHOR ^

Graham Barr <gbarr@cpan.org>

BUGS ^

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

SEE ALSO ^

YAML::Syck, 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.