Group
Extension

Matches 1

Mojolicious-Plugin-MoreHelpers ( M/MO/MONSTAR/Mojolicious-Plugin-MoreHelpers-0.04.tar.gz, MONSTAR, 2020; MetaCPAN )
Mojolicious-Plugin-MoreHelpers/lib/Mojolicious/Plugin/MoreHelpers.pm ( view source; MetaCPAN )
er(validation_json => sub {
    my ($c) = @_;

    my $v = $c->validation;

    my $json = $c->req->json || { };
    $json = { } unless ref $json eq 'HASH';

    for my $key (keys %$json) {
      my $
ot ref $json->{$key}) { $success = 1 }

      elsif (ref $json->{$key} eq 'ARRAY') {
        # Success only if there are no any refs in array
        $success = 1 unless grep { ref $_ } @{$json->{$key
}};
      }

      $v->input->{$key} = $json->{$key} if $success;
    }

    return $v;
  });

  my $reply_headers = sub {
    my ($c, $headers, $message) = @_;

    $headers->{$conf->{header_message}

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