Group
Extension

Matches 3

Terse ( L/LN/LNATION/Terse-0.27.tar.gz, LNATION, 2025; MetaCPAN )
Terse/lib/Terse.pm ( view source; MetaCPAN )
trict;
use warnings;
no warnings 'redefine';
use Plack::Request;
use Plack::Response;
use Cpanel::JSON::XS;
use Scalar::Util qw/reftype/;
use Time::HiRes qw(gettimeofday);
use Terse::WebSocket;
use Wa
URI;
use Struct::WOP qw/all/ => { type => ['UTF-8'], destruct => 1 };

our ($JSON, %PRIVATE);
BEGIN {
	$JSON = Cpanel::JSON::XS->new->utf8->canonical(1)->allow_blessed->convert_blessed;
	%PRIVATE = (
 websocket delayed_response build_terse content_type raiseError graft pretty serialize DESTROY TO_JSON AUTOLOAD to_app/
	);
}

sub new {
	my ($pkg, %args) = @_;
	
	$pkg = ref $pkg if ref $pkg;
 
	if (
Terse ( L/LN/LNATION/Terse-0.27.tar.gz, LNATION, 2025; MetaCPAN )
Terse/lib/Terse/Controller.pm ( view source; MetaCPAN )
response_handle {
	my ($self, $t, $response_body, $sid, $ct, $status) = @_;
	$ct ||= 'application/json';
	my $res = $t->{_delayed_response};
	return $res if ($res);
	my ($content_type, $body) = $self-
Terse ( L/LN/LNATION/Terse-0.27.tar.gz, LNATION, 2025; MetaCPAN )
Terse/lib/Terse/View.pm ( view source; MetaCPAN )
'build_view'));
	return $self;
}

sub render {
	my ($self, $t, $data) = @_;
	return ('application/json', $data->pretty(1)->serialize())
}

1;

=head1 NAME

Terse::View - views made simple.

=head1 VER

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