lat}, $fix->{lon})
}
}
sub log {
my ($self, @arg) = @_;
syswrite $self->{logfh}, JSON::encode_json ([AnyEvent->time, @arg]) . "\n"
if $self->{logfh};
}
=item $gps->record_log ($path)
log {
my ($self, $path) = @_;
if (defined $path) {
$self->record_log;
require JSON;
open $self->{logfh}, ">:perlio", $path
or Carp::croak "$path: $!";
$self-
my ($self, $path, %option) = @_;
if (defined $path) {
$self->replay_log;
require JSON;
open my $fh, "<:perlio", $path
or Carp::croak "$path: $!";
$self->{stretc
#!/usr/bin/env perl
use strict;
use warnings;
use JSON::Syck;
use File::Slurp;
use Getopt::Long;
use File::Spec ();
use File::Path 'mkpath';
use File::Copy 'copy';
#use Smart::Comments;
use List::M
[0] . "-" . $regex_pos[1];
#warn $id;
my $js_ops = JSON::Syck::Dump(\@ops);
my $js_regex_pos = JSON::Syck::Dump(\@regex_pos);
my $js_str_pos = JSON::Syck::Dump(\@str_pos);
#warn scalar(@ops);
#warn
teTime
File::Compare
File::RandomLine
Getopt::Euclid
Getopt::Std
HTML::TagCloud
IO::Socket
JSON
List::Util
List::MoreUtils
Log::Log4perl
Net::Twitter
Perl::Critic
Perl6::Say
Perl6::Slurp
package Net::Dopplr;
use strict;
use Carp;
use Net::Google::AuthSub;
use JSON::Any;
use URI;
use LWP::UserAgent;
use HTTP::Request::Common;
our $VERSION = '0.7';
our $AUTOLOAD;
=head1 NAME
Net::Do
new;
my $json = JSON::Any->new;
my $auth = Net::Google::AuthSub->new(url => $url);
$auth->auth('null', $token);
return bless { _auth => $auth, _ua => $ua, _json => $json, _url => $u
die "Couldn't call $name : ".$res->status_line unless $res->is_success;
return $self->{_json}->decode($res->content);
}
sub DESTROY { }
=head1 AUTHOR
Simon Wistow <simon@thegestalt.org>
we couldn't do the create-unless-exists
logic). The content is of the exact same structure as the JSON one would post to CouchDB.
=item file $PATH
Reads the file at $PATH, converts it to base64, and
parameters, unless it is there and up to date.
The content is of the exact same structure as the JSON one would post to CouchDB, except that
if the C<_id> field does not start with C<_design/> it wil
rnings;
use strict;
use Carp;
use DateTime::Format::Mail;
use HTML::Tiny;
use HTTP::Cookies;
use JSON;
use Data::Dumper;
use LWP::UserAgent;
use Time::Piece;
use WWW::Plurk::Friend;
use WWW::Plurk::M
_success
or $resp->is_redirect;
return $resp;
}
sub _json_post {
my $self = shift;
return $self->_decode_json( $self->_post( @_ )->content );
}
sub _get {
my ( $self, $serv
s_success
or $resp->is_redirect;
return $resp;
}
sub _json_get {
my $self = shift;
return $self->_decode_json( $self->_get( @_ )->content );
}
=head2 C<< login >>
Attempt to l
:Component;
with qw(XIRCD::Role);
use Encode;
use HTTP::Request::Common;
use HTTP::Date ();
use JSON::Any;
use POE qw( Component::Client::HTTP );
use URI;
has 'apiurl' => ( isa => 'Str', is => '
$status,) = get_args;
my $req = HTTP::Request::Common::POST(
self->apiurl . '/update.json',
[ status => encode('utf-8',$status) ],
);
$req->authorization_basic(self->use
tart => sub {
debug "read twitter";
my $uri = URI->new(self->apiurl . '/friends_timeline.json');
$uri->query_form(since => HTTP::Date::time2str(self->since)) if self->since;
self->sin
side and JSON will be used to send the form parameters. What to do?
Well CPAN to the rescue. Install the TT filter for JSON, along with the
JSON.pm module. Now create a template named json.tt like
this:
[% USE JSON %]
[% view.data.json %]
Change the froms template from form.tt to json.tt and add the following
statement:
$self->content_type('application/json');
You are now sendi
ng your form as a JSON datastream.
=item cancel_action (a code ref)
Called with:
your self object
the data you passed to add, edit or deltet
the action (add, edit or delete)
the use
the structure defined in YAML. So if the (unblessed)
structure is dumped using YAML (or perhaps JSON), it may be read as
is by another program, perhaps in another language. It is true that
this cou
the structure defined in YAML. So if the (unblessed)
structure is dumped using YAML (or perhaps JSON), it may be read as
is by another program, perhaps in another language. It is true that
this cou
;
use HTML::AutoPagerize;
use Scalar::Util qw( weaken );
use WWW::Mechanize::DecodedContent;
use JSON;
sub WWW::Mechanize::autopager {
my $mech = shift;
$mech->{autopager} ||= WWW::Mechanize
o {
my $self = shift;
my $url = shift || "http://wedata.net/databases/AutoPagerize/items.json";
my $res = $self->{mech}->get($url);
if (my $content = $self->{mech}->content) {
->{autopager}->add_site(%$site);
}
} else {
for my $row ( @{ from_json( $content ) } ) {
$self->{autopager}->add_site(%{ $row->{data} });
}
BMS-AUS),
and let me into the CGI::Session subversion tree so that I could implement
the YAML and JSON L<CGI::Session|CGI::Session> serializers.
=back
=head1 AUTHOR
Tyler "Crackerjack" MacDonald <j
on are
documented by Mr. Ruzmetov in the perldoc for his module.
If you need some combination of json, yaml, xml, perl, ini or
Config::General formats, take a look at: Config::Merge, which I
learned
package WebService::Wedata;
use warnings;
use strict;
use Carp;
use LWP::UserAgent;
use JSON::XS;
use WebService::Wedata::Database;
use version; our $VERSION = qv('0.0.4');
our $URL_BASE = 'http://w
.json" : '/databases.json';
$page ||= '';
my $url = $URL_BASE . $path;
my $response = $self->{ua}->get($url, page => $page);
if ($response->is_success) {
my $data = decode_json
ams(name)
=item Return Value: none
=back
Delte database.
=head1 DEPENDENCIES
LWP::UserAgent
JSON::XS
=head1 AUTHOR
Tsutomu KOYACHI C<< <rtk2106@gmail.com> >>
=head1 LICENCE AND COPYRIGHT
package WebService::Wedata::Database;
use strict;
use warnings;
use Carp;
use JSON::XS;
use WebService::Wedata::Item;
use base qw/Class::Accessor::Fast/;
__PACKAGE__->mk_accessors(qw/ua api_key name d
.= '/databases/' . $params->{database_name} . '/items.json';
}
elsif ($params->{id}){
$url .= '/items/' . $params->{id} . '.json';
}
else {
croak "specify item_id or d
= $self->ua->get($url, page => $page);
if ($response->is_success) {
my $data = decode_json($response->content);
if ($params->{database_name}) {
my $result = [];
;
use JSON;
use Scalar::Util qw/blessed/;
use JS::YUI::Loader::Entry;
use JS::YUI::Loader::Item;
use JS::YUI::Loader::Carp;
BEGIN {
my $json = JSON->new->relaxed(1);
my $catalog = $json->dec
s',
'path': 'charts/charts-experimental-min.js',
'requires': ['element', 'json', 'datasource']
},
'colorpicker': {
'type': 'js',
'path'
s',
'requires': ['event', 'dom']
},
'json': {
'type': 'js',
'path': 'json/json-min.js',
'requires': ['yahoo']
},
'
f' };
my $pson = obj2pson( $data );
my $obj = pson2obj( $pson );
=head1 DESCRIPTION
Like L<JSON> but use Dumper.
=head1 METHOD
=head2 obj2pson( $object )
get pson data.
=head2 pson2obj( $ps
y $self = shift;
$self->{collection} = {};
}
1;
__END__
BEGIN {
my $json = JSON->new;
my $catalog = $json->decode(map { local $_ = $_; s/'/"/g; $_ } (<<_END_));
{
'animation':
s',
'path': 'charts/charts-experimental-min.js',
'requires': ['element', 'json', 'datasource']
},
'colorpicker': {
'type': 'js',
'path'
s',
'requires': ['event', 'dom']
},
'json': {
'type': 'js',
'path': 'json/json-min.js',
'requires': ['yahoo']
},
'
:Plugin::SessionKit>
The session function is offered.
=item * L<Egg::Release::JSON>
It comes to be able to treat JSON easily.
=item * L<Egg::Release::XML::FeedPP>
L<XML::FeedPP> can be treated.
pper
ImageCropper Control (widget)
=head2 imageloader
ImageLoader Utility (utility)
=head2 json
JSON Utility (utility)
=head2 layout
Layout Manager (widget)
=head2 logger
Logger Control (tool