Group
Extension

Matches 2

Puncheur ( S/SO/SONGMU/Puncheur-v0.3.0.tar.gz, SONGMU, 2015; MetaCPAN )
Puncheur/lib/Puncheur/Plugin/JSON.pm ( view source; MetaCPAN )
package Puncheur::Plugin::JSON;
use 5.010;
use strict;
use warnings;
use JSON;

our @EXPORT = qw/res_json/;

sub res_json {
    my ($self, $data) = @_;

    state $json = JSON->new->ascii(1);
    stat
# ditto.
    };
    my $body = $json->encode($data);
    $body =~ s!([+<>])!$escape->{$1}!g;

    my $user_agent = $self->req->user_agent || '';
    # defense from JSON hijacking
    if (
        (!$s
&&
        ($self->req->method||'GET') eq 'GET')
    {
        my $content = "Your request may be JSON hijacking.\nIf you are not an attacker, please add 'X-Requested-With' header to each request.";
 
Puncheur ( S/SO/SONGMU/Puncheur-v0.3.0.tar.gz, SONGMU, 2015; MetaCPAN )
Puncheur/lib/Puncheur/Plugin/HandleStatic.pm ( view source; MetaCPAN )
        my $app_name = $self->app_name;
                my $is_text = qr/\b(?:text|xml|javascript|json)\b/;
                state $cache = {};
                if ($cache->{$app_name}{$path_info}) {
  

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