Group
Extension

Matches 1

Catalyst-View-TT-Progressive ( L/LN/LNATION/Catalyst-View-TT-Progressive-0.04.tar.gz, LNATION, 2025; MetaCPAN )
Catalyst-View-TT-Progressive/lib/Catalyst/View/TT/Progressive.pm ( view source; MetaCPAN )
 warnings;

use Moose; # Catalyst::View;
extends 'Catalyst::View::TT';
our $VERSION = '0.04';
use JSON;

around 'render' => sub {
	my ($meth, $orig, $c, $template, $args) = (@_, $_[2]->stash());
	my (
($c->stash->{JSON}) {
		my $body = $self->build_json($c, $c->stash->{JSON});
		$body->{html} = $output;
		$output = JSON->new->encode($body);
		$c->response->content_type("application/json; charset=UT
ault);
		}
	}

	$c->response->body($output);

	return 1;
}

sub build_json {
	my ($self, $c, $json) = @_;
	return ref $json ? $json : {};
}

1;

__END__

=head1 NAME

Catalyst::View::TT::Progressive -

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.