Group
Extension

Matches 35359

Business-Cart-Generic ( R/RS/RSAVAGE/Business-Cart-Generic-0.85.tgz, RSAVAGE, 2012; MetaCPAN )
Business-Cart-Generic/lib/Business/Cart/Generic/View/Base.pm ( view source; MetaCPAN )
 'order_message_div',
		content => $self -> templater -> render('error.tx', $param),
	};

	return JSON::XS -> new -> utf8 -> encode($output);

} # End of format_errors.

# ----------------------------
> 'order_message_div',
		content => $self -> templater -> render('note.tx', $param),
	};

	return JSON::XS -> new -> utf8 -> encode($output);

} # End of format_note.

# ------------------------------
ns a JSON and utf8 encoded block of text (usually of error messages) suitable for sending to the client.

=head2 format_note($note)

$note is a hashref of information for the user.

Returns a JSON and
MediaWiki-API ( E/EX/EXOBUZZ/MediaWiki-API-0.39.tar.gz, EXOBUZZ, 2012; MetaCPAN )
MediaWiki-API/lib/MediaWiki/API.pm ( view source; MetaCPAN )
rnings;
use strict;

# our required modules

use LWP::UserAgent;
use URI::Escape;
use Encode;
use JSON;
use Carp;

# just for debugging the module
# use Data::Dumper;
# use Devel::Peek;

use constant 
=item * retries = Integer value; The number of retries to send an API request if an http error or JSON decoding error occurs. Defaults to 0 (try only once - don't retry). If max_retries is set to 4, a
nteger value in seconds; The amount of time to wait before retrying a request if an HTTP error or JSON decoding error occurs.

=item * max_lag = Integer value in seconds; Wikipedia runs on a database 
App-mymeta_requires ( D/DA/DAGOLDEN/App-mymeta_requires-0.003.tar.gz, DAGOLDEN, 2012; MetaCPAN )
App-mymeta_requires/lib/App/mymeta_requires.pm ( view source; MetaCPAN )
t;
  my @candidates = $self->opt->get_file
    ? ($self->opt->get_file)
    : qw/MYMETA.json MYMETA.yml META.json META.yml/;
  for my $f ( @candidates ) {
    next unless -r $f;
    my $mymeta = eval 
Business-Cart-Generic ( R/RS/RSAVAGE/Business-Cart-Generic-0.85.tgz, RSAVAGE, 2012; MetaCPAN )
Business-Cart-Generic/lib/Business/Cart/Generic/View/Search.pm ( view source; MetaCPAN )
package Business::Cart::Generic::View::Search;

use strict;
use warnings;

use JSON::XS;

use Moose;

extends 'Business::Cart::Generic::View::Base';

use namespace::autoclean;

our $VERSION = '0.85';
Google-GeoCoder-Smart ( T/TT/TTG/GoogleGeoCoderSmart/Google-GeoCoder-Smart-1.16.tar.gz, TTG, 2012; MetaCPAN )
Google-GeoCoder-Smart/lib/Google/GeoCoder/Smart.pm ( view source; MetaCPAN )


package Google::GeoCoder::Smart;

require Exporter;

use LWP::Simple qw(!head);

use JSON;

our @ISA = qw(Exporter);

our @EXPORT = qw(geocode parse);

our $VERSION = 1.16;

=head1 NAME

Smart - Goo
ing. 

This module only depends on LWP::Simple and JSON. 

This version removes the depriciated homemade xml parsing and goes completely with the JSON format. 

If you need the old xml version, the ol
}{lng};

It is helpful to know the format of the json returns of the api. 

A good example can be found at http://www.google.com/maps/apis/geocode/json?address=1600+Amphitheatre+Parkway+Mountain+View,
Business-Cart-Generic ( R/RS/RSAVAGE/Business-Cart-Generic-0.85.tgz, RSAVAGE, 2012; MetaCPAN )
Business-Cart-Generic/lib/Business/Cart/Generic/View/Product.pm ( view source; MetaCPAN )
package Business::Cart::Generic::View::Product;

use strict;
use warnings;

use JSON::XS;

use Moose;

use Text::Xslate 'mark_raw';

extends 'Business::Cart::Generic::View::Base';

use namespace::auto
Metabase ( D/DA/DAGOLDEN/Metabase-1.001.tar.gz, DAGOLDEN, 2012; MetaCPAN )
Metabase/lib/Metabase/Index/FlatFile.pm ( view source; MetaCPAN )
lk::Array;
use Fcntl ':flock';
use IO::File ();
use List::AllUtils qw/any all/;
use JSON 2 qw/encode_json decode_json/;
use Regexp::SQL::LIKE 0.001 qw/to_regexp/;
use Tie::File;
use MooseX::Types::Pat
" ) unless $fact->guid;

    my $metadata = $self->clone_metadata( $fact );
    my $line = encode_json($metadata);
    my $filename = $self->index_file;
    my $fh = IO::File->new( $filename, "a+" )
 
   flock $fh, LOCK_SH;
    {
        while ( my $line = <$fh> ) {
            my $parsed = decode_json($line);
            push @matches, $parsed if $query->{-where}->($parsed);
        }
    }
    $f
CPAN-Testers-Metabase ( D/DA/DAGOLDEN/CPAN-Testers-Metabase-1.999002.tar.gz, DAGOLDEN, 2012; MetaCPAN )
CPAN-Testers-Metabase/lib/CPAN/Testers/Metabase/Demo.pm ( view source; MetaCPAN )
$data_dir->mkpath or die "coudln't make path to $data_dir";

  my $index = $data_dir->file('index.json');
  $index->touch;

  my $archive = $data_dir->file('archive.sqlite');

  return Metabase::Libra
Dancer-Plugin-Res ( I/IR/IRONCAMEL/Dancer-Plugin-Res-0.0003.tar.gz, IRONCAMEL, 2012; MetaCPAN )
Dancer-Plugin-Res/lib/Dancer/Plugin/Res.pm ( view source; MetaCPAN )
ets' => sub {
        return res 400 => to_json { err => 'name is required' }
            unless param 'name';
        # ...
        return res 201 => to_json { widget => $widget };
    };
    dance;
Bot-Cobalt-DB-Term ( A/AV/AVENJ/Bot-Cobalt-DB-Term-0.001.tar.gz, AVENJ, 2012; MetaCPAN )
Bot-Cobalt-DB-Term/lib/Bot/Cobalt/DB/Term.pm ( view source; MetaCPAN )
      " Inserts raw data as the value of the specified key.",
      " Note that <data> is usually JSON.",
    ],
 
    putref => [
      "putref <key> <perl data>",
      " Inserts a serialized Perl d
{
    print $o "Usage: getref <key>\n";
    return
  }

  my $ser = Bot::Cobalt::Serializer->new('JSON');

  unless ( $db->dbopen(ro => 1) ) {
    print $o "Database open failure\n";
    return
  }
  
f;
  eval { $ref = $ser->thaw($item) };
  if ($@) {
    print $o "Could not thaw value; maybe not JSON?\n";
    return
  }
  
  unless (ref $ref) {
    print $o "Thawed value not a reference\n";
    r
Catalyst-Plugin-Server-JSONRPC-Batch ( D/DI/DIONYS/Catalyst-Plugin-Server-JSONRPC-Batch-0.02.tar.gz, DIONYS, 2012; MetaCPAN )
Catalyst-Plugin-Server-JSONRPC-Batch/lib/Catalyst/Plugin/Server/JSONRPC/Batch.pm ( view source; MetaCPAN )
gin::Server::JSONRPC::Batch;

use strict;
use warnings;

use Class::Load ();
use HTTP::Body ();


our $VERSION = '0.02';

our $Method = 'system.handle_batch';


BEGIN {
	my $class = 'JSON::RPC::Common
q 'ARRAY') {
				return $class->new_from_data(
					jsonrpc => '2.0',
					id      => scalar(time()),
					method  => $Catalyst::Plugin::Server::JSONRPC::Batch::Method,
					params  => $args[0]
				);
up_engine {
	my $app = shift();

	$app->server->jsonrpc->add_private_method(
		$Method => sub {
			my ($c, @args) = @_;

			my $config = $c->server->jsonrpc->config;
			my $req    = $c->req;
			my $re
Metabase ( D/DA/DAGOLDEN/Metabase-1.001.tar.gz, DAGOLDEN, 2012; MetaCPAN )
Metabase/lib/Metabase/Archive/Filesystem.pm ( view source; MetaCPAN )
::Fact;
use Carp ();
use Data::Stream::Bulk::Callback;
use Data::GUID ();
use File::Slurp ();
use JSON 2 ();
use MooseX::Types::Path::Class;

with 'Metabase::Archive';

has 'root_dir' => (
    is => '
File::Slurp::write_file(
        $self->_guid_path( $guid ),
        {binmode => ':raw'},
        JSON->new->ascii->encode($fact_struct),
    );

    return $guid;
}

# given guid, retrieve it and ret
($guid) );
}

sub _extract_file {
  my ($self, $file) = @_;
  # read the fact
  my $fact_struct = JSON->new->ascii->decode(
    File::Slurp::read_file( $file, { binmode => ':raw' } ),
  );
  return $f
Metabase-Backend-SQL ( D/DA/DAGOLDEN/Metabase-Backend-SQL-1.000.tar.gz, DAGOLDEN, 2012; MetaCPAN )
Metabase-Backend-SQL/lib/Metabase/Archive/SQL.pm ( view source; MetaCPAN )
:Bulk::Array;
use Data::Stream::Bulk::DBI;
use Data::Stream::Bulk::Filter;
use File::Temp ();
use JSON 2      ();
use List::AllUtils qw/uniq/;
use Metabase::Fact;
use SQL::Abstract;
use SQL::Translato
,
  };

  my $json = eval { JSON->new->utf8->encode($fact) };
  Carp::confess "Couldn't convert to JSON: $@"
  unless $json;

#  if ( $self->compressed ) {
#    $json    = compress($json);
#  }


  tr
f->dbis->insert($self->_table_name, {
        guid => $self->_munge_guid($guid),
        fact => $json,
      });
    $self->dbis->commit;
  }
  catch {
    $self->dbis->rollback;
    Carp::confess("E
ASP4 ( J/JO/JOHND/ASP4-1.087.tar.gz, JOHND, 2012; MetaCPAN )
ASP4/lib/ASP4/Response.pm ( view source; MetaCPAN )
 to whatever you set your config->data_connections->session->cookie_domain to
in your asp4-config.json.  Otherwise defaults to C<$ENV{HTTP_HOST}>.

You can override the defaults by passing in a domain
ASP4 ( J/JO/JOHND/ASP4-1.087.tar.gz, JOHND, 2012; MetaCPAN )
ASP4/lib/ASP4/ConfigNode/Web.pm ( view source; MetaCPAN )
gNode::Web;

use strict;
use warnings 'all';
use base 'ASP4::ConfigNode';
use Carp 'confess';
use JSON::XS;


sub new
{
  my $class = shift;
  
  my $s = $class->SUPER::new( @_ );
  $s->{handler_resol
ding: $!";
      local $/;
      my $json = eval { decode_json( scalar(<$ifh>) ) }
        or confess "Error parsing '$item->{include_routes}': $@";
      ref($json) eq 'ARRAY'
        or confess "Fil
e '$item->{include_routes}' should be an arrayref but it's a '@{[ ref($json) ]}' instead.";
      @$json;
    } : $_
  } @original;
  
  my $router = Router::Generic->new();
  map { $router->add_route
Net-CoverArtArchive ( C/CY/CYCLES/Net-CoverArtArchive-1.02.tar.gz, CYCLES, 2012; MetaCPAN )
Net-CoverArtArchive/lib/Net/CoverArtArchive/CoverArt.pm ( view source; MetaCPAN )
se;
use namespace::autoclean;

use Moose::Util::TypeConstraints;

coerce 'Bool', from class_type('JSON::XS::Boolean'), via { $_ ? 1 : 0 };

has id => (
    isa => 'Int',
    is => 'ro',
    required =
ASP4 ( J/JO/JOHND/ASP4-1.087.tar.gz, JOHND, 2012; MetaCPAN )
ASP4/lib/ASP4/StaticHandler.pm ( view source; MetaCPAN )
g',
    png   => 'image/png',
    bmp   => 'image/bmp',
    gif   => 'image/gif',
    json  => 'application/x-json',
    css   => 'text/css',
    pdf   => 'application/x-pdf',
    js    => 'text/javas
ASP4 ( J/JO/JOHND/ASP4-1.087.tar.gz, JOHND, 2012; MetaCPAN )
ASP4/lib/ASP4/Config.pm ( view source; MetaCPAN )
    $conn->password
    );
  }# end foreach()

=head1 JSON Config File

ASP4::ASP keeps all of its configuration inside of C</conf/asp4-config.json>

Here is an example:

  {
    "system": {
      "po
ASP4 ( J/JO/JOHND/ASP4-1.087.tar.gz, JOHND, 2012; MetaCPAN )
ASP4/lib/ASP4/ErrorHandler.pm ( view source; MetaCPAN )
d1 NAME

ASP4::ErrorHandler - Default fatal error handler

=head1 SYNOPSIS

In your C<asp4-config.json>:

  ...
    "errors": {
      "error_handler":    "ASP4::ErrorHandler",
      "mail_errors_to": 
ASP4 ( J/JO/JOHND/ASP4-1.087.tar.gz, JOHND, 2012; MetaCPAN )
ASP4/lib/ASP4/ConfigLoader.pm ( view source; MetaCPAN )
rict;
use warnings 'all';
use Carp 'confess';
use ASP4::ConfigFinder;
use ASP4::ConfigParser;
use JSON::XS;

our $Configs = { };


#====================================================================
$ifh, '<', $path
    or die "Cannot open '$path' for reading: $!";
  local $/;
  my $doc = decode_json( scalar(<$ifh>) );
  close($ifh);
  
  (my $where = $path) =~ s/\/conf\/[^\/]+$//;
  $Configs->{$
hed on a per-path basis.  Paths are full - i.e. C</usr/local/projects/mysite.com/conf/asp4-config.json> - 
so there should never be a clash between two different configurations on the
same web server,

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