Group
Extension

Matches 1

SPRAGL-Cgi_reply ( S/SP/SPRAGL/SPRAGL-Cgi_reply-1.3.tar.gz, SPRAGL, 2023; MetaCPAN )
SPRAGL-Cgi_reply/lib/SPRAGL/Cgi_reply.pm ( view source; MetaCPAN )
qw(import);

our $VERSION = 1.30;

use File::Spec ();
use File::Basename qw(basename);
use JSON qw(encode_json);

my sub qwac( $s ) {grep{/./} map{split /\s+/} map{s/#.*//r} split/\v+/ , $s;};

our @E
.
    reply_file # Send file and exit.
    reply_html # Send HTML reply and exit.
    reply_json # Send JSON reply and exit.
    set_header # Add or overwrite headers.
    cexec      # CGI exec comman
    };


sub reply_json {
    my ($hashref) = signature(1,0,@_);
    $header{'Content-Type'} = 'application/json; charset=utf-8';
    rcheck;
    print_headers;
    print encode_json($hashref);
    ce

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