Group
Extension

Matches 35358

Authorization-AccessControl ( T/TY/TYRRMINAL/Authorization-AccessControl-0.04.tar.gz, TYRRMINAL, 2024; MetaCPAN )
Authorization-AccessControl/lib/Authorization/AccessControl/Dispatch.pm ( view source; MetaCPAN )
)

Handlers can be repeated:

  $request->yield(sub(){...})
    ->granted(sub($value){ $c->render(json => $value) })
    ->granted(\&write_audit_log)

=head1 DESCRIPTION

This is a lightweight class t
Config-ROFL ( N/NI/NICOMEN/Config-ROFL-1.12.tar.gz, NICOMEN, 2024; MetaCPAN )
Config-ROFL/lib/Config/ROFL.pm ( view source; MetaCPAN )
Carp::croak 'Could not find config file: ' . $self->config_path . '/' . $self->name . '.(conf|yml|json)';
  }

  if (my $prefix = $self->envvar_prefix) {
    my $hash = {};
    foreach my $key (grep {
ATH};

  if (List::Util::first {-e} glob path($self->global_path, $self->name) . '.{conf,yml,yaml,json,ini}') {
    return $self->global_path;
  }
}

sub _log {
  my $self = shift;
  say {*STDERR} shi
Suricata-Monitoring ( V/VV/VVELOX/Suricata-Monitoring-1.0.0.tar.gz, VVELOX, 2024; MetaCPAN )
Suricata-Monitoring/lib/Suricata/Monitoring.pm ( view source; MetaCPAN )
package Suricata::Monitoring;

use 5.006;
use strict;
use warnings;
use JSON;
use File::Path qw(make_path);
use File::ReadBackwards;
use Carp;
use File::Slurp;
use Time::Piece;
use Hash::Flatten qw(:a
Base64;
use IO::Compress::Gzip qw(gzip $GzipError);

=head1 NAME

Suricata::Monitoring - LibreNMS JSON SNMP extend and Nagios style check for Suricata stats

=head1 VERSION

Version 1.0.0

=cut

our $

        files=>{
               'ids'=>'/var/log/suricata/alert-ids.json',
               'foo'=>'/var/log/suricata/alert-foo.json',
               },
    };

    my $sm=Suricata::Monitoring->new( $a
Sah-PSchemaBundle-Array ( P/PE/PERLANCAR/Sah-PSchemaBundle-Array-0.010.tar.gz, PERLANCAR, 2024; MetaCPAN )
Sah-PSchemaBundle-Array/lib/Sah/PSchema/perl/modname_with_optional_args.pm ( view source; MetaCPAN )
           recurse_matching=>'all-at-once',
        }],
    }];

    my $schema_ary = [array_from_json => {
        min_len => 1,
        max_len => 2,
        elems => [
            $schema_str,
    
Plack-Middleware-HealthCheck ( G/GS/GSG/Plack-Middleware-HealthCheck-v0.2.1.tar.gz, GSG, 2024; MetaCPAN )
Plack-Middleware-HealthCheck/lib/Plack/Middleware/HealthCheck.pm ( view source; MetaCPAN )
::Util::Accessor qw(
    health_check
    health_check_paths
    allowed_params
);

use Carp;
use JSON         ();
use Scalar::Util ();

sub new {
    my ( $class, @args ) = @_;
    my %params = @args
alth_check_response {
    my ( $self, $result, $req ) = @_;
    my $json = JSON->new->allow_blessed->convert_blessed->utf8;
    $json->canonical->pretty
        if $req and exists $req->query_paramete
| '' ) eq 'OK'
            ? 200 : 503,
        [ 'Content-Type' => 'application/json; charset=utf-8' ],
        [ $json->encode($result) ] ];
}

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

Plack
SWISH-3 ( K/KA/KARMAN/SWISH-3-1.000016.tar.gz, KARMAN, 2024; MetaCPAN )
SWISH-3/lib/SWISH/3.pm ( view source; MetaCPAN )
 {
                $tmp{$k} = $v;
            }
        }
        return \%tmp;
    }

    sub TO_JSON {
        return shift->_as_hash;
    }

    sub FREEZE {
        return shift->_as_hash;
    }

DBIx-Class-Events ( G/GS/GSG/DBIx-Class-Events-v0.9.3.tar.gz, GSG, 2024; MetaCPAN )
DBIx-Class-Events/lib/DBIx/Class/Events.pm ( view source; MetaCPAN )
lts>.

    package MyApp::Schema::Result::ArtistEvent;

    use warnings;
    use strict;
    use JSON;

    use base qw( DBIx::Class::Core );

    __PACKAGE__->load_components(qw/ InflateColumn::Date
not have to be JSON, just be able to serialize a hashref.
    {
        my $json = JSON->new->utf8;
        __PACKAGE__->inflate_column( 'details' => {
            inflate => sub { $json->decode(shift
) },
            deflate => sub { $json->encode(shift) },
        } );
    }

This L<C<belongs_to>|DBIx::Class::Relationship/belongs_to>
relationship is optional,
and the examples and tests assume if 
Mail-Exim-ACL-Attachments ( V/VO/VOEGELAS/Mail-Exim-ACL-Attachments-1.006.tar.gz, VOEGELAS, 2024; MetaCPAN )
Mail-Exim-ACL-Attachments/lib/Mail/Exim/ACL/Attachments.pm ( view source; MetaCPAN )
warn
      condition = ${if and{{def:mime_filename} \
        {!match{${lc:$mime_filename}}{\N\.((json|xml)\.gz|zip)$\N}} \
        {eq{${perl{check_filename}{$mime_filename}}}{blocked}}}}
      set a
warn
      condition = ${if and{{def:mime_filename} \
        {!match{${lc:$mime_filename}}{\N\.((json|xml)\.gz|zip)$\N}} \
        {eq{${perl{check_filename}{$mime_filename}}}{blocked}}}}
      set a
p compressed
data.

DMARC and SMTP TLS reporting send attachments with the filename extensions
F<.json.gz> and F<.xml.gz>.  Make sure that such messages are not rejected.

Headers that are added in Ex
Google-ProtocolBuffers-Dynamic ( M/MB/MBARBON/Google-ProtocolBuffers-Dynamic-0.43.tar.gz, MBARBON, 2024; MetaCPAN )
Google-ProtocolBuffers-Dynamic/scripts/benchmark.pl ( view source; MetaCPAN )
use strict;
use warnings;

use Benchmark qw(cmpthese);
use Sereal;
use JSON::XS ();
use JSON ();
use Google::ProtocolBuffers;
use Google::ProtocolBuffers::Dynamic;

Google::ProtocolBuffers->parsefile(
icPerson->encode($person);
my $sereal_person = $sereal_encoder->encode($person);
my $json_person = JSON::encode_json($person);

sub encode_protobuf_pp_one { Test::Person->encode($person); }
sub encode
de($person); }
sub encode_sereal_one { $sereal_encoder->encode($person); }
sub encode_json_one { JSON::encode_json($person); }

sub decode_protobuf_pp_one { Test::Person->decode($pbd_person); }
sub de
CGI-Tiny ( D/DB/DBOOK/CGI-Tiny-1.003.tar.gz, DBOOK, 2024; MetaCPAN )
CGI-Tiny/lib/CGI/Tiny.pod ( view source; MetaCPAN )
 == 413) {
          $cgi->render(json => {error => 'Request body limit exceeded'});
        } elsif ($cgi->response_status_code == 400) {
          $cgi->render(json => {error => 'Bad request'});
   
     } else {
          $cgi->render(json => {error => 'Internal server error'});
        }
      }
    });

    my $method = $cgi->method;
    my $fribble;
    if ($method eq 'GET' or $method eq 'HEA
->param('download')) {
      $cgi->set_response_disposition(attachment => 'fribble.json');
    }
    $cgi->render(json => {fribble => $fribble});
  };

=head1 DESCRIPTION

CGI::Tiny provides a modern 
CGI-Tiny ( D/DB/DBOOK/CGI-Tiny-1.003.tar.gz, DBOOK, 2024; MetaCPAN )
CGI-Tiny/lib/CGI/Tiny/Cookbook.pod ( view source; MetaCPAN )
ipt.source.cgi > script.cgi

To pack in optional modules, such as JSON support for Perls older than 5.14:

  $ fatpack trace --use=JSON::PP script.source.cgi
  $ fatpack packlists-for $(cat fatpacker.

=head2 JSON

CGI::Tiny has built in support for parsing and rendering JSON content with
L<JSON::PP>. CGI scripts that deal with JSON content will greatly benefit from
installing L<Cpanel::JSON::XS> v
es can be encoded to JSON and base64 for transport.

  #!/usr/bin/perl
  use strict;
  use warnings;
  use utf8;
  use CGI::Tiny;
  use Cpanel::JSON::XS qw(decode_json encode_json);
  use MIME::Base64
Google-ProtocolBuffers-Dynamic ( M/MB/MBARBON/Google-ProtocolBuffers-Dynamic-0.43.tar.gz, MBARBON, 2024; MetaCPAN )
Google-ProtocolBuffers-Dynamic/lib/Google/ProtocolBuffers/Dynamic/Message.pod ( view source; MetaCPAN )
r binary data into a message instance.

=head2 decode_json

    $msg = Message::Class->decode_json($json_data);

Deserializes Protocol Buffer JSON data into a message instance.

=head2 encode

    $se
code_json

    $serialized_data = Message::Class->encode_json({ ... });
    $serialized_data = Message::Class->encode_json($message_instance);
    $serialized_data = $message_instance->encode_json;

S
izes the given message instance (or mix of message instances and
plain hashes) to Protocol Buffer JSON format.

=head2 check

    Message::Class->check({ ... });
    Message::Class->check($message_ins
CGI-Tiny ( D/DB/DBOOK/CGI-Tiny-1.003.tar.gz, DBOOK, 2024; MetaCPAN )
CGI-Tiny/lib/CGI/Tiny.pm ( view source; MetaCPAN )
};
}

sub body_json {
  my ($self) = @_;
  unless (exists $self->{body_json}) {
    $self->{body_json} = undef;
    if ($ENV{CONTENT_TYPE} and $ENV{CONTENT_TYPE} =~ m/^application\/json\b/i) {
      $
self->{body_json} = $self->_json->decode($self->body);
    }
  }
  return $self->{body_json};
}

sub body_params      { [map { [@$_] } @{$_[0]->_body_params->{ordered}}] }
sub body_param_names { [@{$_
) {
    return 0+$1;
  }
  return 200;
}

{
  my %RENDER_TYPES = (text => 1, html => 1, xml => 1, json => 1, data => 1, file => 1, handle => 1, redirect => 1);

  sub render {
    my ($self, $type, $d
Google-ProtocolBuffers-Dynamic ( M/MB/MBARBON/Google-ProtocolBuffers-Dynamic-0.43.tar.gz, MBARBON, 2024; MetaCPAN )
Google-ProtocolBuffers-Dynamic/lib/Google/ProtocolBuffers/Dynamic.pm ( view source; MetaCPAN )
;
    $person = Humans::Person->decode_json('{"id":31,"name":"John Doe"}');
    $bytes = Humans::Person->encode($person);
    $bytes = Humans::Person->encode_json($person);

    # field accessors
    
 C<"">.

=item numeric

Maps C<true> to C<1> and C<false> to C<0>.

=item json

Loads L<JSON> and uses C<JSON::true> and C<JSON::false> as
C<true>/C<false> values.

=back

=head2 check_required_fields
Text-Amuse-Compile ( M/ME/MELMOTHX/Text-Amuse-Compile-1.90.tar.gz, MELMOTHX, 2024; MetaCPAN )
Text-Amuse-Compile/bin/muse-create-font-file.pl ( view source; MetaCPAN )
muse-create-font-file.pl - Generate a JSON file with font paths

=head1 SYNOPSIS

  muse-create-font-file.pl [ outputfile.json ]

If the argument is not provided, output the JSON to the STDOUT.

=cut
Google-ProtocolBuffers-Dynamic ( M/MB/MBARBON/Google-ProtocolBuffers-Dynamic-0.43.tar.gz, MBARBON, 2024; MetaCPAN )
Google-ProtocolBuffers-Dynamic/scripts/profile.pl ( view source; MetaCPAN )
use strict;
use warnings;

use Benchmark qw(cmpthese);
use Sereal;
use JSON::XS ();
use JSON ();
use Google::ProtocolBuffers::Dynamic;
use Getopt::Long;

{
    my $d = Google::ProtocolBuffers::Dynamic

my $sereal_encoder = Sereal::Encoder->new;
my $sereal_decoder = Sereal::Decoder->new;
my $json_decoder = JSON::XS->new;

exit main();

sub main {
    my %suites = (
        decode_maps         => \&p
nchmarks = (
        bbpb    => 'protobuf_bbpb',
        upb     => 'protobuf_upb',
        json    => 'json',
        sereal  => 'sereal',
    );

    my $error;
    my $arg_ok = GetOptions(
        
Bio-SeqAlignment-Components-Sundry ( C/CH/CHRISARG/Bio-SeqAlignment-Components-Sundry-0.01.tar.gz, CHRISARG, 2024; MetaCPAN )
Bio-SeqAlignment-Components-Sundry/lib/Bio/SeqAlignment/Components/Sundry/DocumentSequenceModifications.pm ( view source; MetaCPAN )
warnings;

use Carp;
use Data::MessagePack;
use File::Basename;
use File::Spec;
use JSON qw (encode_json decode_json);
use YAML::Tiny;

use Exporter qw(import);
our @EXPORT_OK = qw(store_modifications
 },
    json => {
        decode => sub {
            my ($mod_fname) = @_;
            open my $infile_fh, '<', $mod_fname
              or die "Could not open file: $!";
            my $json = do { 
local $/; <$infile_fh> };
            close $infile_fh;
            return decode_json($json);
        
        },
        encode => sub {
            my ( $mod_HoH_ref, $mod_fname ) = @_;
           
Google-ProtocolBuffers-Dynamic ( M/MB/MBARBON/Google-ProtocolBuffers-Dynamic-0.43.tar.gz, MBARBON, 2024; MetaCPAN )
Google-ProtocolBuffers-Dynamic/src/mapper.h ( view source; MetaCPAN )
ude "ref.h"

#include <upb/pb/encoder.h>
#include <upb/pb/decoder.h>
#include <upb/json/printer.h>
#include <upb/json/parser.h>

#include "unordered_map.h"

#include "EXTERN.h"
#include "perl.h"
#incl
l on_numeric_bool(DecoderHandlers *cxt, const int *field_index, bool val);
        static bool on_json_bool(DecoderHandlers *cxt, const int *field_index, bool val);

        void push_mapper(const Map
 bufsize);
    SV *decode_bbpb(const char *buffer, STRLEN bufsize);
    SV *encode_json(SV *ref);
    SV *decode_json(const char *buffer, STRLEN bufsize);
    bool check(SV *ref);

    const char *las
Google-ProtocolBuffers-Dynamic ( M/MB/MBARBON/Google-ProtocolBuffers-Dynamic-0.43.tar.gz, MBARBON, 2024; MetaCPAN )
Google-ProtocolBuffers-Dynamic/src/dynamic.h ( view source; MetaCPAN )
Def;

struct MappingOptions {
    enum BoolStyle {
        Perl = 1,
        Numeric = 2,
        JSON = 3,
    };

    enum AccessorStyle {
        GetAndSet = 1,
        PlainAndSet = 2,
        Sin
Bio-SeqAlignment-Components-Sundry ( C/CH/CHRISARG/Bio-SeqAlignment-Components-Sundry-0.01.tar.gz, CHRISARG, 2024; MetaCPAN )
Bio-SeqAlignment-Components-Sundry/lib/Bio/SeqAlignment/Components/Sundry.pm ( view source; MetaCPAN )

this module provides a simple way to store and retrieve it in common serialization
formats (e.g. JSON/YAML/MessagePack). Storing this information in this manner
allows for easy retrieval and use in d

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