're using JSON::Typist
use Data::Printer::Filter;
#pod =head1 SYNOPSIS
#pod
#pod This filter will beautify (I hope) dumping of:
#pod
#pod =for :list
#pod * JSON::Typist::Number
#pod * JSON::Typist::
String
#pod * JSON::PP::Boolean
#pod
#pod More filtering may be added over time.
#pod
#pod =cut
filter 'JSON::Typist::Number' => sub {
my ($object, $ddp) = @_;
return $ddp->maybe_colorize($$obje
dp->maybe_colorize('jnum', 'number')
. $ddp->maybe_colorize(']', 'brackets');
};
filter 'JSON::Typist::String' => sub {
my ($object, $ddp) = @_;
require Data::Printer::Common;
my $str
package Datastar::SSE;
use strict;
use warnings;
use 5.10.0;
our $VERSION = '0.26';
use JSON ();
use HTTP::ServerEvent;
use Scalar::Util qw/reftype/;
use Exporter qw/import unimport/;
# use Datasta
ES)] );
my $json; # cache
sub _encode_json($) {
($json ||= JSON->new->allow_blessed->convert_blessed)->encode( @_ );
}
sub _decode_json($) {
# uncoverable subroutine
($json ||= JSON->new->allow
ata, +{ onlyIfMissing => _bool( $only_if_missing )};
}
if (ref $signals) {
$signals = _encode_json( $signals);
}
push @data, +{ signals => $signals };
$class->_datastar_event(
$event,
$opti
pe ipc_warn pid_is_running/;
use Test2::Util::UUID qw/gen_uuid/;
use Test2::Harness::Util::JSON qw/encode_json/;
use Test2::Harness::Instance::Message;
use Test2::Harness::Instance::Request;
use Test
>read_file});
my $json = encode_json($msg);
my $ok;
while (1) {
$! = 0;
last if eval { local $SIG{PIPE} = 'IGNORE'; $self->pipe->write_message($json); 1 };
next i
f $! == EINTR;
$self->terminate();
croak "Disconnected pipe";
}
return $json;
}
sub send_request {
my $self = shift;
my ($api_call, $args, %params) = @_;
croak "
ts::State;
use strict;
use warnings;
our $VERSION = '2.000004';
use Test2::Harness::Util::File::JSON;
use Scalar::Util qw/weaken/;
use Time::HiRes qw/time/;
use List::Util qw/first min sum0 max/;
us
urn $self->init_state unless -e $self->{+STATE_FILE};
my $file = Test2::Harness::Util::File::JSON->new(name => $self->{+STATE_FILE});
my ($ok, $err);
for (1 .. 5) {
my $state;
umask($self->{+STATE_UMASK});
my $ok = eval {
my $file = Test2::Harness::Util::File::JSON->new(name => $self->{+STATE_FILE});
$file->rewrite($state_copy);
1;
};
my
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("events");
__PACKAGE__->add_columns(
"event_uuid",
{ data_type => "uu
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("users");
__PACKAGE__->add_columns(
"user_id",
{ data_type => "bigint
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("run_fields");
__PACKAGE__->add_columns(
"event_uuid",
{ data_type =>
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("runs");
__PACKAGE__->add_columns(
"run_uuid",
{ data_type => "uuid",
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("reporting");
__PACKAGE__->add_columns(
"reporting_id",
{ data_type =
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("email_verification_codes");
__PACKAGE__->add_columns(
"evcode",
{ da
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("source_subs");
__PACKAGE__->add_columns(
"source_sub_id",
{ data_typ
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("session_hosts");
__PACKAGE__->add_columns(
"session_host_id",
{ data
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("config");
__PACKAGE__->add_columns(
"config_id",
{ data_type => "int
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("job_tries");
__PACKAGE__->add_columns(
"job_try_uuid",
{ data_type =
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("api_keys");
__PACKAGE__->add_columns(
"value",
{ data_type => "uuid"
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("run_fields");
__PACKAGE__->add_columns(
"event_uuid",
{ data_type =>
"name",
{ data_type => "varchar", is_nullable => 0, size => 64 },
"data",
{ data_type => "json", default_value => \"null", is_nullable => 1 },
"details",
{ data_type => "text", default_val
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("users");
__PACKAGE__->add_columns(
"user_id",
{ data_type => "intege
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("binaries");
__PACKAGE__->add_columns(
"event_uuid",
{ data_type => "
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("email_verification_codes");
__PACKAGE__->add_columns(
"evcode",
{ da
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("reporting");
__PACKAGE__->add_columns(
"reporting_id",
{
data_ty