Catalyst-View-Xslate

 view release on metacpan or  search on metacpan

lib/Catalyst/View/Xslate.pm  view on Meta::CPAN

package Catalyst::View::Xslate;
use Moose;
use Moose::Util::TypeConstraints qw(coerce from where via subtype);
use Encode;
use Text::Xslate;
use namespace::autoclean;
use Scalar::Util qw/blessed weaken/;
use File::Find ();

our $VERSION = '0.00019';

extends 'Catalyst::View';

with 'Catalyst::Component::ApplicationAttribute';

has catalyst_var => (
    is => 'rw',

lib/Catalyst/View/Xslate.pm  view on Meta::CPAN

    else {
        $res->body( $output );
    }

    return 1;
}

sub build_exposed_method {
    my ( $self, $ctx, $code ) = @_;
    my $weak_ctx = $ctx;
    weaken $weak_ctx;

    return sub { $self->$code($weak_ctx, @_) };
}

sub render {
    my ($self, $c, $template, $vars) = @_;

    $vars = $vars ? $vars : $c->stash;

    if ($self->has_expose_methods) {



( run in 0.232 second using v1.01-cache-2.11-cpan-94b05bcf43c )