e::Generator::Parser::Excel::VERSION = '0.05';
use Moose::Role;
use DateTime::Format::Excel;
use JSON;
with 'Spreadsheet::Template::Generator::Parser';
requires '_create_workbook';
has _excel_dt =
'#ffffff'; # XXX
$format_data->{bold} = JSON::true
if $format->{Font}{Bold};
$format_data->{italic} = JSON::true
if $format->{Font}{Italic};
>{AlignV}}
unless $format->{AlignV} == 2;
$format_data->{text_wrap} = JSON::true
if $format->{Wrap};
}
if (!$format->{IgnoreNumberFormat}) {
vent::Twitter;
use AnyEvent::Twitter::Stream;
use HTML::Entities;
use Regexp::Common qw/URI/;
use JSON::MaybeXS;
with 'MooseX::Log::Log4perl';
=head1 NAME
POE::Component::Server::Twirc - Twitter/IR
twitter_rest_api_request => 'request',
},
);
sub to_json { JSON::MaybeXS->new->encode($_[1]) }
sub to_pretty_json { JSON::MaybeXS->new->pretty>encode($_[1]) }
# force build of users by
keepalive");
},
on_friends => sub {
TRACE("on_friends: ", $self->to_json(@_));
$self->yield(friends_ids => shift);
},
on_event => sub {
ither;
use Smart::Args qw( args );
sub from_api {
args my $json => 'Either[Left[Str] | Right[Int]]';
$json->flat_map(sub {
# ...
});
}
from_api(right(1));
:Data::Monad::Maybe;
use Smart::Args qw( args );
sub from_api {
args my $json => 'MaybeM[HashRef]';
$json->flat_map(sub {
# ...
});
}
from_api(just +{ ok => 1 });
from_ap
;
use Smart::Args qw( args );
sub maybe_value_from_api {
args my $json => 'MaybeM[HashRef]';
$json->flat_map(sub {
# ...
});
}
maybe_value_from_api(just +{
alue_from_api(nothing);
sub value_or_error_from_api {
args my $json => 'Either[Left[Str] | Right[Int]]';
$json->flat_map(sub {
# ...
});
}
value_or_error_from_a
:Random::Secure qw(random_bytes);
use MIME::Base64;
use Digest::SHA qw(sha256_base64 sha256);
use JSON;
use utf8;
use Encode;
use strict;
use Exporter;
use vars qw($VERSION);
use vars qw($VERSION @I
sh {
my ($json) = @_;
my $h;
my $js = JSON->new();
# for invalid json
$js->relaxed(1);
# convert to utf-8
$js->utf8;
eval {
# eval required for no exception if bad json
$h = $j
@_;
my $s = '';
my $js = JSON->new();
# for invalid json
$js->relaxed(1);
$js->pretty(1) if ($pretty);
eval {
# eval required for no exception if bad json
$s = $js->encode($h);
object models a set of version constraints like those
#pod specified in the F<META.yml> or F<META.json> files in CPAN distributions. It
#pod can be built up by adding more and more constraints, and i
ents object models a set of version constraints like those
specified in the F<META.yml> or F<META.json> files in CPAN distributions. It
can be built up by adding more and more constraints, and it wil
t;
my $method = shift || 'TO_JSON';
my $config = shift;
if (ref $method && ref $method ne 'CODE') {
$config = $method;
$method = 'TO_JSON';
}
return ext_parcel(
use JSON::MaybeXS;
use Web::Util::ExtPaging;
sub dispatch_request {
my $people_rs = get_rs();
sub (/people) {
[
200,
[ 'Content-type', 'application/json' ],
[ encode_json(ext_paginate($rs->search(undef, { rows => 25 }))) ],
]
},
sub (/people_lite) {
[
200,
[ 'Content-type', 'application/json' ],
[
s qw(compile);
use Types::Standard -types;
use Errno qw(EINTR);
use Scalar::Util qw(blessed);
use JSON::XS;
use Carp;
$Carp::Internal{ (__PACKAGE__) }++;
use Module::Runtime qw(use_module);
require by
xes, $links ) = $check->(@_);
($content_type //= 'application/json')
eq 'application/json'
and $value = encode_json($value);
$self->_store( $bucket, $key, $value, $content_type
if we need to decode
$args->{decode} && ($content_type // '') eq 'application/json'
and return \decode_json($value);
# simply return the value
return \$value;
}
sub _store {
m
:Server::Twirc::State::VERSION = '0.20';
use Moose;
use MooseX::Storage;
with Storage(format => 'JSON', io => 'File');
has access_token => isa => 'Str', is => 'rw';
has access_token_secret
);
$client->is_alive() or die "riak is not alive";
# store hashref. will be serialized as JSON
$client->put( 'bucket_name', 'key_name', { some => 'structure' } );
# store text
$client->
ue as first argument. If the content_type
of the fetched value is C<'application/json'>, automatically decodes the JSON
into a Perl structure. If you need the raw data you can use C<get_raw>.
=head2
client->get_raw($bucket, $key, $coderef);
Same as C<get>, but no automatic JSON decoding will be performed. If you want
JSON to be automatically decoded, you should use C<get()> instead.
=head2 put(
nal)
The policy that grants an entity permission to assume the role
Will be decoded to Hash from json.
=item CreateDate (required)
The date and time, in ISO 8601 date-time format, when the role was
package WebService::Cryptsy;
use Moo;
our $VERSION = '1.008007'; # VERSION
use URI;
use JSON::MaybeXS;
use LWP::UserAgent;
use Digest::SHA qw/hmac_sha512_hex/;
use HTTP::Request::Common qw/POST/;
lf, $json, $method ) = @_;
unless ( $json ) {
$self->error('Network error: got no data');
return
}
$self->error( undef );
my $decoded = eval { decode_json( $json );
};
if ( $@ ) {
$self->error('JSON parsing error: ' . $@);
return;
}
unless ( $decoded and $decoded->{success} ) {
$self->error( $decoded && $decoded->{error}
}
$properties = {
map {
my $v = $properties->{$_};
$_ => JSON::is_bool($v) ? ($v ? 1 : 0)
: $_ eq 'left' ? $border{$v}
: $
ies->{pattern}}
unless $format_properties->{pattern} =~ /^\d+$/;
}
my $key = JSON->new->canonical->encode($format_properties);
if (exists $self->_formats->{$key}) {
re
ect;
use IO::Socket::INET;
use lib "./";
use plugin_eng;
use POE qw(Component::Server::TCP);
#use JSON::XS;
use Clone qw(clone);
use Encode;
#use MongoDB;
use Smart::Comments;
#use Conn_mongo_jc
#!/usr/bin/perl
use Encode;
#use JSON::XS;
use Clone qw(clone);
use MongoDB;
use Smart::Comments;
use lib "./";
use Conn_mongo_jc;
use Data::Dumper;
use IO::File;
#use Add_info;
# http://poe.per
!/usr/bin/perl
#词词距离计算
#输入为:
#老虎
#鲜花
#月亮
#狮子
use POSIX;
#use JSON::XS;
use Clone qw(clone);
use MongoDB;
use Smart::Comments;
use lib "/home/wyb/shell/";
#use
#!/usr/bin/perl
use POE qw(Component::Server::TCP);
#use JSON::XS;
use Clone qw(clone);
#use MongoDB;
#use Smart::Comments;
#use lib "/home/wuyabo/shell/";
#use Conn_mongo_jc;
use Data::Dumper;
#u
ect;
use IO::Socket::INET;
use lib "./";
use plugin_eng;
use POE qw(Component::Server::TCP);
#use JSON::XS;
use Clone qw(clone);
use Encode;
#use MongoDB;
use Smart::Comments;
#use Conn_mongo_jc
ect;
use IO::Socket::INET;
use lib "./";
use plugin_eng;
use POE qw(Component::Server::TCP);
#use JSON::XS;
use Clone qw(clone);
use Encode;
#use MongoDB;
use Smart::Comments;
#use Conn_mongo_jc