Group
Extension

Matches 35359

Opsview-StatusAPI ( J/JL/JLMARTIN/Opsview-StatusAPI-0.02.tar.gz, JLMARTIN, 2012; MetaCPAN )
Opsview-StatusAPI/lib/Opsview/StatusAPI.pm ( view source; MetaCPAN )
structures.

=cut

use strict;
use warnings;
use Carp;
use HTTP::Request;
use LWP::UserAgent;
use JSON::Any;

our $VERSION = '0.02';

our $states = { 'ok' => 0, 'warning' => '1', 'critical' => '2', 'u
;

  $self->{'_url'} = $self->_get_url();
  $self->{'_ua'} = LWP::UserAgent->new;
  $self->{'_json'} = JSON::Any->new;

  return $self;
}

sub _get_url {
  my $self = shift;
  return sprintf('%s://%s/
sword'});

  my $req = HTTP::Request->new( GET => $url );
  $req->header( 'Content-Type' => 'text/json' );
  $req->header( 'X-Username' => $self->{'user'} );
  $req->header( 'X-Password' => $self->{'p
Config-General-Hierarchical ( I/IC/ICC/Config-General-Hierarchical-0.07.tar.gz, ICC, 2012; MetaCPAN )
Config-General-Hierarchical/Hierarchical/Dump.pm ( view source; MetaCPAN )
$fixed_length, $help, $json );
    my ( $sfile, $stfile );
    my $error = '';

    parse_options( $params_array, \$error, \$check, \$file, \$fixed_length,
        \$help, \$json );

    return <<EOF 
ut as fixed length fields
 -h, --help           prints this help and exits
 -j, --json           prints output as json
EOF

    if ($parser_class) {
        eval "require $parser_class";
    }
    els
ass->new( file => $file_name ); };

    return "Parsing error: $@\n" if $@;

    return json_dump($cfg) if $json;

    my @output = deep_dump( [], $cfg, \@errors );
    my $output = ( $check && scalar
Net-OAuth2-Scheme ( W/WR/WROG/Net-OAuth2-Scheme-0.03.tar.gz, WROG, 2012; MetaCPAN )
Net-OAuth2-Scheme/lib/Net/OAuth2/Scheme.pm ( view source; MetaCPAN )
uthorization grant
  ... send token request

  # receive token
  #
  my %params = ... decode from JSON, URI fragment, etc...
  my ($error, @token) = $access_scheme->token_accept(%params)
  ... complai
ear in a successful token or authorization
endpoint response (i.e., prior to being encoded into a JSON structure
or URI fragment on the authorization server, or, equivalently, after
such decoding on t
Web-App ( A/AP/APLA/Web-App-1.21.tar.gz, APLA, 2012; MetaCPAN )
Web-App/lib/Web/App/Helper.pm ( view source; MetaCPAN )
$pack->root;
	
	my $global_config_patch_json = delete $files->{global_config_patch_json};
	my $local_config_patch_json  = delete $files->{local_config_patch_json};
	
	debug "storing config files";
	
	
hin helper we have json structures
	my $serializer = Project::Easy::Config->serializer ('json');
	
	# global config
	my $patch = $serializer->parse_string ($global_config_patch_json);
	$pack->conf_pat
n
	$local_config_patch_json = Project::Easy::Config::string_from_template (
		$local_config_patch_json,
		$vars
	);
	$patch = $serializer->parse_string ($local_config_patch_json);
	$pack->fixup_path->
Web-App ( A/AP/APLA/Web-App-1.21.tar.gz, APLA, 2012; MetaCPAN )
Web-App/lib/Web/App/Response.pm ( view source; MetaCPAN )

	# 1. set correct presentation
	# 2. remove redirect header
	
	$app->set_presentation ({type => 'json'});
	
	return;
}

sub new {
	my $class = shift;
	
	my $self = dclone ($template);
	
	if ($Class::
DBI-Easy ( A/AP/APLA/DBI-Easy-0.24.tar.gz, APLA, 2012; MetaCPAN )
DBI-Easy/lib/DBI/Easy/Record.pm ( view source; MetaCPAN )
f ! exists $result->{$col_meta->{field_name}};
	}
	
	return {%{$self->{embed}}, %$result};
}

*TO_JSON = \&hash;
*TO_XML  = \&hash;

sub embed {
	my $self = shift;
	my $what = shift;
	
	if (@_ == 1) {
Webservice-InterMine-Bio ( I/IN/INTERMINE/Webservice-InterMine-Bio-0.9900.tar.gz, INTERMINE, 2012; MetaCPAN )
Webservice-InterMine-Bio/lib/Webservice/InterMine/Bio/RegionQuery.pm ( view source; MetaCPAN )
ension,
        isInterbase => ($self->is_interbase ? "true" : "false"),
    };
    return $self->json->encode($query);
}

=head2 get_list_request_parameters(List[Str => Str])

Returns the request par
 = shift;
    return $self->_sequence_results("gff3");
}

with 'Webservice::InterMine::Role::KnowsJSON';
with 'Webservice::InterMine::Role::Listable';

no Moose;
__PACKAGE__->meta->make_immutable();

Web-App ( A/AP/APLA/Web-App-1.21.tar.gz, APLA, 2012; MetaCPAN )
Web-App/lib/Web/App/Request.pm ( view source; MetaCPAN )
content output";
	
	# fix for "Wide characters to print"
	binmode STDOUT, ":utf8";
	utf8::decode ($content);
	$| = 1;
	
	print $content;
}

sub TO_JSON {
	my $self = shift;
	
	return {%$self}; 
}

1;
WWW-DNSMadeEasy ( G/GE/GETTY/WWW-DNSMadeEasy-0.001.tar.gz, GETTY, 2012; MetaCPAN )
WWW-DNSMadeEasy/lib/WWW/DNSMadeEasy.pm ( view source; MetaCPAN )
TP;
use Digest::HMAC_SHA1 qw(hmac_sha1 hmac_sha1_hex);
use LWP::UserAgent;
use HTTP::Request;
use JSON;

use WWW::DNSMadeEasy::Domain;

our $VERSION ||= '0.0development';

has api_key => (
	is => 'ro'
request->header('Accept' => 'application/json');
	if (defined $data) {
		$request->header('Content-Type' => 'application/json');
		$request->content(encode_json($data));
	}
	my $res = $self->_http_age
nt->request($request);
	if ($res->is_success) {
		return decode_json($res->content);
	} else {
		die __PACKAGE__.' HTTP request failed: '.$res->status_line, "\n";
	}
}

#
# DOMAINS
#

sub path_domains
WebService-NFSN ( C/CJ/CJM/WebService-NFSN-1.02.tar.gz, CJM, 2011; MetaCPAN )
WebService-NFSN/lib/WebService/NFSN/DNS.pm ( view source; MetaCPAN )
fresh retry)],
    methods => {
      addRR          => [qw(name type data ttl?)],
      'listRRs:JSON' => [qw(name? type? data?)],
      removeRR       => [qw(name type data)],
      updateSerial   =
PerlX-QuoteOperator ( D/DR/DRAEGTUN/PerlX-QuoteOperator-0.04.tar.gz, DRAEGTUN, 2011; MetaCPAN )
PerlX-QuoteOperator/lib/PerlX/QuoteOperator/URL.pm ( view source; MetaCPAN )
e:

    use PerlX::QuoteOperator::URL 'qh';
    use JSON qw(decode_json);

    say decode_json( qh{ http://twitter.com/statuses/show/6592721580.json } )->{text};

    # => "He nose the truth."
    

=
Voting-VoteFairRanking ( F/FO/FOBES/Voting-VoteFairRanking-5.01.tar.gz, FOBES, 2011; MetaCPAN )
Voting-VoteFairRanking/lib/Voting/VoteFairRanking.pm ( view source; MetaCPAN )
ware
#  framework that handles all text-related
#  information extracted from an EML or XML
#  or JSON data file.  This allows the VoteFair
#  Ranking software to just handle numbers
#  (and a few err
WebService-NFSN ( C/CJ/CJM/WebService-NFSN-1.02.tar.gz, CJM, 2011; MetaCPAN )
WebService-NFSN/lib/WebService/NFSN.pm ( view source; MetaCPAN )
 Load a JSON package and define our decode_json function:

BEGIN
{
  if (_eval "use JSON::XS ()") {
    # Can't find JSON::XS, try JSON (2.0 or later):
    _eval_or_die "use JSON qw(decode_json)";
  }
    if ($JSON::XS::VERSION >= 2) {
      *decode_json = \&JSON::XS::decode_json;
    } else {
      *decode_json = \&JSON::XS::from_json; # old name for decode_json
    } # end else found JSON::XS pri
or to version 2.0
  } # end else we were able to load JSON::XS
} # end BEGIN

#=====================================================================
# Define exceptions:

use Exception::Class (
  'Web
WebService-NFSN ( C/CJ/CJM/WebService-NFSN-1.02.tar.gz, CJM, 2011; MetaCPAN )
WebService-NFSN/lib/WebService/NFSN/Email.pm ( view source; MetaCPAN )
=======
BEGIN {
  __PACKAGE__->_define(
    type => 'email',
    methods => {
      'listForwards:JSON' => [],
      removeForward => [qw(forward)],
      setForward    => [qw(forward dest_email)],
  
Any-Renderer ( K/KM/KMCGRATH/Any-Renderer-1.015_02.tar.gz, KMCGRATH, 2011; MetaCPAN )
Any-Renderer/lib/Any/Renderer/JavaScript/Anon.pm ( view source; MetaCPAN )
 $self;
}

sub render
{
  my ( $self, $data ) = @_;

  if ($self->{'format'} eq 'JSON') {
    TRACE ( "Rendering to JSON" );
    DUMP ( $data );

    return Data::JavaScript::Anon->anon_dump ( $data )
late
{
  return 0;
}

sub available_formats
{
  return [ "JavaScript::Anon", "Javascript::Anon", "JSON" ];
}

sub TRACE {}
sub DUMP {}

1;

=head1 NAME

Any::Renderer::JavaScript::Anon - renders anony
 JSON

Use the format 'JSON' to return completely anonymous data structures - i.e. with no leading
"var script_output = " and no trailing ";"

  perl -MAny::Renderer -e "print Any::Renderer->new('JSON
Module-Install-ParseRequires ( R/RO/ROKR/Module-Install-ParseRequires-0.002.tar.gz, ROKR, 2011; MetaCPAN )
Module-Install-ParseRequires/lib/Module/Install/ParseRequires.pm ( view source; MetaCPAN )
equires <<_END_
    Moose
    Xyzzy 1.02
    JSON 2
    _END_

Is equivalent to:

    requires 'Moose' => 0
    requires 'Xyzzy' => 1.02
    requires 'JSON' => 2

=head2 parse_requires $kind, $documen
WebService-NFSN ( C/CJ/CJM/WebService-NFSN-1.02.tar.gz, CJM, 2011; MetaCPAN )
WebService-NFSN/lib/WebService/NFSN/Member.pm ( view source; MetaCPAN )
===============
BEGIN {
  __PACKAGE__->_define(
    type => 'member',
    ro => [qw(accounts:JSON sites:JSON)],
  );
} # end BEGIN

#===================================================================
Net-SMS-TextMagic ( M/MP/MPLATTU/Net-SMS-TextMagic-1.00.tar.gz, MPLATTU, 2011; MetaCPAN )
Net-SMS-TextMagic/lib/Net/SMS/TextMagic.pm ( view source; MetaCPAN )
tmagic.com/

package Net::SMS::TextMagic;

use strict;
use warnings;

our $VERSION = '1.00';

use JSON;
use LWP::UserAgent;
use URI::Escape qw(uri_escape uri_escape_utf8);
use Encode qw(encode decode)
_json = contact_api($class, 'send', %params);
	
	if (defined($r_json)) {
		# No errors
		
		my %response = ();

		$response{'sent_text'} = $r_json->{'sent_text'};

		$response{'parts_count'} = $r_json
->{'parts_count'};

		while (my ($id, $number) = each %{$r_json->{"message_id"}} ) {
			  $response{'message_id'}{$number} = $id;
			  }

		return %response;
		}
	else {
		# Errors, we expect that err
WebService-NFSN ( C/CJ/CJM/WebService-NFSN-1.02.tar.gz, CJM, 2011; MetaCPAN )
WebService-NFSN/tools/My_Build.pm ( view source; MetaCPAN )
JSON 2 can substitute for JSON::XS:

sub prereq_failures
{
  my $self = shift @_;

  my $out = $self->SUPER::prereq_failures(@_);

  return $out unless $out;

  if (my $attrib = $out->{requires}{'JSON
    my $message;

    eval "use JSON 2 ();";

    if (not $@) {
      # JSON 2.0 or later is an acceptable replacement for JSON::XS:
      delete $out->{requires}{'JSON::XS'};

      # Clean out empty
JSON 2.0 or later can substitute for JSON::XS, but its pure-Perl
   implementation is slower, and you don't have it installed either.

    } # end else we couldn't load JSON 2 either
  } # end if JSON
WebService-NFSN ( C/CJ/CJM/WebService-NFSN-1.02.tar.gz, CJM, 2011; MetaCPAN )
WebService-NFSN/lib/WebService/NFSN/Account.pm ( view source; MetaCPAN )
=> 'account',
    ro => [qw(balance balanceCash balanceCredit balanceHigh
            status:JSON sites:JSON)],
    rw => [qw(friendlyName)],
    methods => {
      addSite       => [qw(site)],
      

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