Group
Extension

Matches 35359

Qless ( N/NU/NUCLON/Qless-0.06.tar.gz, NUCLON, 2012; MetaCPAN )
Qless/lib/Qless.pm ( view source; MetaCPAN )
we can do the work associated with it!
    $job->process();

The job data must be serializable to JSON, and it is recommended that you use a hash for it. See below for a list of the supported job opti
Debian-Apt-PM ( J/JK/JKUTEJ/Debian-Apt-PM-0.09.tar.gz, JKUTEJ, 2012; MetaCPAN )
Debian-Apt-PM/lib/Debian/Apt/PM.pm ( view source; MetaCPAN )
compare';
use AptPkg::Config '$_config';
use LWP::Simple 'mirror', 'RC_OK';
use Carp 'croak';
use JSON::Util;
use CPAN::Version;
use Storable 'dclone';
use List::MoreUtils 'uniq';
use File::is;

use D
filename } @existing;
		if (mirror($url, $filename) == RC_OK) {
			my $json_filename = $filename; $json_filename =~ s/\.bz2$/.json/;
			my $content;
			my $bz_content = IO::Any->slurp($filename);
			b
ror\n";
			JSON::Util->encode([$self->_parse_perlpackages_content($content)], $json_filename);
		}
	}
	
	# remove no longer wanted indexes
	foreach my $old_filename (@existing) {
		my $json_filename =
Hypatia ( J/JA/JACKMANEY/Hypatia-0.029.tar.gz, JACKMANEY, 2012; MetaCPAN )
Hypatia/lib/Hypatia/DBI/Test/SQLite.pm ( view source; MetaCPAN )
:DBI::Test::SQLite;
{
  $Hypatia::DBI::Test::SQLite::VERSION = '0.029';
}
use Moose;
use DBI;
use JSON;
use Path::Class;
use namespace::autoclean;

has 'sqlite_dir'=>(isa=>'Str', is=>'ro',default=>sub
    my $table=$self->table;
    
    my $json_str="";
    
    $json_str.= " " .$_ while(<DATA>);
    
    my $table_data=JSON->new->relaxed->utf8->decode($json_str);
    
    my $found=0;
    
    fo
Catalyst-Action-REST ( B/BO/BOBTFISH/Catalyst-Action-REST-1.06.tar.gz, BOBTFISH, 2012; MetaCPAN )
Catalyst-Action-REST/lib/Catalyst/Request/REST.pm ( view source; MetaCPAN )
EST-y subclass of Catalyst::Request

=head1 SYNOPSIS

     if ( $c->request->accepts('application/json') ) {
         ...
     }

     my $types = $c->request->accepted_content_types();

=head1 DESCRI
Hypatia ( J/JA/JACKMANEY/Hypatia-0.029.tar.gz, JACKMANEY, 2012; MetaCPAN )
Hypatia/lib/Hypatia.pm ( view source; MetaCPAN )
iles (initially XML or ini; the only thing making this difficult for JSON is that queries usually take more than one line, and JSON doesn't support multi-line strings).

=item * Finish up some more of
Qless ( N/NU/NUCLON/Qless-0.06.tar.gz, NUCLON, 2012; MetaCPAN )
Qless/lib/Qless/Client.pm ( view source; MetaCPAN )
package Qless::Client;
=head1 NAME

Qless::Client

=cut

use strict; use warnings;
use JSON::XS qw(decode_json);
use Sys::Hostname qw(hostname);
use Time::HiRes qw();
use Qless::Lua;
use Qless::Config
t
sub tags {
	my ($self, $offset, $count) = @_;
	$offset ||= 0;
	$count  ||= 100;

	return decode_json($self->_tag([], 'top', $offset, $count));
}

=head2 C<event - TBD>

Listen for a single event
=cu
Qless ( N/NU/NUCLON/Qless-0.06.tar.gz, NUCLON, 2012; MetaCPAN )
Qless/lib/Qless/Job.pm ( view source; MetaCPAN )
use warnings;
use base 'Qless::BaseJob';
use Qless::Utils qw(fix_empty_array);
use JSON::XS qw(decode_json encode_json);
use Class::Load qw(try_load_class);
use Time::HiRes qw();

sub new {
	my $class
ient'}->_put([$queue],
		$self->jid,
		$self->klass,
		encode_json($self->data),
		Time::HiRes::time,
		$delay||0,
		'depends', encode_json($depends||[])
	);
}

sub complete {
	my ($self, $next, $dela
>worker_name, $self->queue_name,
			Time::HiRes::time, encode_json($self->data), 'next', $next, 'delay', $delay||0, 'depends', encode_json($depends||[])
		);
	}
	else {
		return $self->client->_comple
HTTP-LRDD ( T/TO/TOBYINK/HTTP-LRDD-0.106.tar.gz, TOBYINK, 2012; MetaCPAN )
HTTP-LRDD/lib/HTTP/LRDD.pm ( view source; MetaCPAN )
f ($response->content_type =~ m'^(application/rdf\+xml|(application|text)/(x-)?(rdf\+)?(turtle|n3|json))'i)
	{
		if (uc $response->request->method ne 'GET')
		{
			$self->_ua->max_redirect(3);
			$res
le';
		$type = 'RDFXML'  if $response->content_type =~ /rdf.xml/;
		$type = 'RDFJSON' if $response->content_type =~ /json/;
	}
	else
	{
		return ($response, undef);
	}
	
	$response->is_success or retu
Qless ( N/NU/NUCLON/Qless-0.06.tar.gz, NUCLON, 2012; MetaCPAN )
Qless/lib/Qless/Utils.pm ( view source; MetaCPAN )
arnings;

use base 'Exporter';
our @EXPORT_OK = qw(fix_empty_array);

# Because of how Lua parses JSON, empty arrays comes through as {}
sub fix_empty_array {
	my $val = shift;

	if (!$val) {
		return
Qless ( N/NU/NUCLON/Qless-0.06.tar.gz, NUCLON, 2012; MetaCPAN )
Qless/lib/Qless/Queues.pm ( view source; MetaCPAN )
ueues;
=head1 NAME

Qless::Queues

=cut

use strict; use warnings;
use Qless::Queue;
use JSON::XS qw(decode_json);
use Time::HiRes qw();
use Qless::Utils qw(fix_empty_array);

sub new {
	my $class = s
;

	$self->{'client'} = $client;

	$self;
}

sub counts {
	my ($self) = @_;
	my $results = decode_json($self->{'client'}->_queues([], Time::HiRes::time));
	$results = fix_empty_array($results);
	retur
Qless ( N/NU/NUCLON/Qless-0.06.tar.gz, NUCLON, 2012; MetaCPAN )
Qless/lib/Qless/Config.pm ( view source; MetaCPAN )
package Qless::Config;
=head1 NAME

Qless::Config

=cut

use strict; use warnings;
use JSON::XS qw(decode_json);

sub new {
	my $class = shift;
	my ($client) = @_;

	$class = ref $class if ref $class;
 $key) = @_;
	if ($key) {
		return $self->{'client'}->_config([], 'get', $key);
	}
	return decode_json($self->{'client'}->_config([], 'get'));
}

sub set {
	my ($self, $key, $value) = @_;
	return $sel
Qless ( N/NU/NUCLON/Qless-0.06.tar.gz, NUCLON, 2012; MetaCPAN )
Qless/lib/Qless/Workers.pm ( view source; MetaCPAN )
package Qless::Workers;
=head1 NAME

Qless::Workers

=cut

use strict; use warnings;
use JSON::XS qw(decode_json);
use Time::HiRes qw();
use Qless::Utils qw(fix_empty_array);

sub new {
	my $class = s
lts = decode_json($self->{'client'}->_workers([], Time::HiRes::time));
	$results = fix_empty_array($results);
	return $results;
}

sub item {
	my ($self, $name) = @_;
	my $rv = decode_json($self->{'cl
Qless ( N/NU/NUCLON/Qless-0.06.tar.gz, NUCLON, 2012; MetaCPAN )
Qless/lib/Qless/RecurringJob.pm ( view source; MetaCPAN )
less::RecurringJob

=cut

use strict; use warnings;
use base 'Qless::BaseJob';
use JSON::XS qw(decode_json encode_json);

sub new {
	my $class = shift;

	my ($client, $args) = @_;

	$class = ref $clas
', $_[1]) }
sub data     { $#_ == 0 ? $_[0]->SUPER::data     : $_[0]->_set_key('data',     encode_json($_[1])) }
sub klass    { $#_ == 0 ? $_[0]->SUPER::klass    : $_[0]->_set_key('klass',    $_[1]) }
Catalyst-Action-REST ( B/BO/BOBTFISH/Catalyst-Action-REST-1.06.tar.gz, BOBTFISH, 2012; MetaCPAN )
Catalyst-Action-REST/lib/Catalyst/Action/Serialize/JSONP.pm ( view source; MetaCPAN )
package Catalyst::Action::Serialize::JSONP;
use Moose;
use namespace::autoclean;

extends 'Catalyst::Action::Serialize::JSON';

our $VERSION = '1.06';
$VERSION = eval $VERSION;

after 'execute' => sub
.$c->res->output().');');
    } else {
      warn 'Callback: '.$callback_value.' will not generate valid Javascript. Falling back to JSON output';
    }
  }
};

__PACKAGE__->meta->make_immutable;

1;
Text-Xslate ( G/GF/GFUJI/Text-Xslate-1.6002.tar.gz, GFUJI, 2012; MetaCPAN )
Text-Xslate/lib/Text/Xslate/Manual/Cookbook.pod ( view source; MetaCPAN )
ipt meta characters by yourself when you put data into
C<< <script> ... </script> >> sections.

C<JSON> module is not suitable because it doesn't escape some meta
characters such as C<< "</script>" >>
Text-Xslate ( G/GF/GFUJI/Text-Xslate-1.6002.tar.gz, GFUJI, 2012; MetaCPAN )
Text-Xslate/benchmark/json.pl ( view source; MetaCPAN )
se strict;

use Text::Xslate;
use JSON::XS;

use Benchmark qw(:all);
use Config; printf "Perl/%vd %s\n", $^V, $Config{archname};

foreach my $mod(qw(Text::Xslate JSON::XS)){
    print $mod, '/', $mod-
>VERSION, "\n";
}

my $n = shift(@ARGV) || 10;

my %vpath = (
    json => <<'TX',
<ul>
: for $books ->($item) {
    <li><:= $item.title :> (<: $item.author :>)</li>
: }
</ul>
TX
);

my $tx = Text::Xsl
->new(
    path      => \%vpath,
    cache_dir => '.xslate_cache',
    cache     => 2,
);

my $json = JSON::XS->new();

my %vars = (
     books => [(
        { title  => 'Islands in the stream',
     
Catalyst-Action-REST ( B/BO/BOBTFISH/Catalyst-Action-REST-1.06.tar.gz, BOBTFISH, 2012; MetaCPAN )
Catalyst-Action-REST/lib/Catalyst/Controller/REST.pm ( view source; MetaCPAN )
lization.

=item * C<application/json> => C<JSON>

Uses L<JSON> to generate JSON output.  It is strongly advised to also have
L<JSON::XS> installed.  The C<text/x-json> content type is supported but i
ns to the json object.
For instance, to relax permissions when deserializing input, add:
  __PACKAGE__->config(
    json_options => { relaxed => 1 }
  )

=item * C<text/javascript> => C<JSONP>

If a c
allback=? parameter is passed, this returns javascript in the form of: $callback($serializedJSON);

Note - this is disabled by default as it can be a security risk if you are unaware.

The usual MIME 
Qless ( N/NU/NUCLON/Qless-0.06.tar.gz, NUCLON, 2012; MetaCPAN )
Qless/lib/Qless/Queue.pm ( view source; MetaCPAN )
ackage Qless::Queue;
=head1 NAME

Qless:Queue

=cut

use strict; use warnings;
use JSON::XS qw(decode_json encode_json);
use Qless::Jobs;
use Qless::Job;
use Time::HiRes qw();

=head1 METHODS

=head2 
e'}, $self->{'client'});
}

=head2 C<counts>

=cut

sub counts {
	my ($self) = @_;
	return decode_json($self->{'client'}->_queues([], Time::HiRes::time, $self->{'name'}));
}

=head2 C<heartbeat>
=cut
_json($data),
		Time::HiRes::time,
		$args{'delay'} || 0,
		'priority', $args{'priority'} || 0,
		'tags', encode_json($args{'tags'} || []),
		'retries', $args{'retries'} || 5,
		'depends', encode_json
Catalyst-Action-REST ( B/BO/BOBTFISH/Catalyst-Action-REST-1.06.tar.gz, BOBTFISH, 2012; MetaCPAN )
Catalyst-Action-REST/lib/Catalyst/Action/REST.pm ( view source; MetaCPAN )
ia Type" error. What gives?!

A:  Most likely, you haven't set Content-type equal to "application/json", or
one of the accepted return formats.  You can do this by setting it in your query
accepted re
mats.  You can do this by setting it in your query string
thusly: C<< ?content-type=application%2Fjson (where %2F == / uri escaped). >>

B<NOTE> Apache will refuse %2F unless configured otherwise.
Mak
Catalyst-Action-REST ( B/BO/BOBTFISH/Catalyst-Action-REST-1.06.tar.gz, BOBTFISH, 2012; MetaCPAN )
Catalyst-Action-REST/lib/Catalyst/TraitFor/Request/REST.pm ( view source; MetaCPAN )
        # cope with invalid (missing required q parameter) header like:
            # application/json; charset="utf-8"
            # http://tools.ietf.org/html/rfc2616#section-14.1
            unless
ing it REST methods and attributes.

=head1 SYNOPSIS

     if ( $c->request->accepts('application/json') ) {
         ...
     }

     my $types = $c->request->accepted_content_types();

=head1 DESCRI

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