Group
Extension

Matches 35358

Net-Discident ( M/MN/MNF/Net-Discident-v1.0.1.tar.gz, MNF, 2012; MetaCPAN )
Net-Discident/lib/Net/Discident.pm ( view source; MetaCPAN )
ern::Perl;
use Digest::MD5     qw( md5_hex );
use File::Find;
use File::stat;
use HTTP::Lite;
use JSON;

use version;
our $VERSION = qv( 1.0.1 );

use constant BASE_URI => 'http://discident.com/v1';


        unless 200 == $code;
    
    return $http->body()
        if $raw;
    
    return from_json $http->body()
}
sub query_url {
    my $self  = shift;
    my $ident = shift // $self->ident();
 
HTML-FormsDj ( T/TL/TLINDEN/HTML-FormsDj-0.03.tar.gz, TLINDEN, 2012; MetaCPAN )
HTML-FormsDj/lib/HTML/FormsDj.pm ( view source; MetaCPAN )
hods here are not sufficient for you or if you have
to output something different than HTML (e.g. JSON or XML).

The structure returned will look like this (based on our
example above with some data f
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) {
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
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
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
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();

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
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
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
Weather-TW ( D/DR/DRYMAN/Weather-TW-0.500002.tar.gz, DRYMAN, 2011; MetaCPAN )
Weather-TW/lib/Weather/TW.pm ( view source; MetaCPAN )
encode decode/;
use LWP::UserAgent;
use HTML::TreeBuilder;
use HTML::Element;
use XML::Smart;
use JSON;
use YAML qw(Dump);
use utf8;
use Carp;



my %area_zh = (
  '台北市'      => '36_01_data.htm'
my $weather = Weather::TW->new;
    my $xml = $weather->area('Taipei City')->xml;
    my $json = $weather->json;
    my $yaml = $weather->yaml;
    my %hash = $weather->hash;
  
    foreach my $area (
PTION

This module parse data from L<http://www.cwb.gov.tw/> (中央氣象局), and generates xml/json/hash/yaml data.

=head1 OLD METHODS

=over

=item C<< new >>

Create a new C<Weather::TW> object.
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."
    

=
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
Any-Renderer ( K/KM/KMCGRATH/Any-Renderer-1.015_02.tar.gz, KMCGRATH, 2011; MetaCPAN )
Any-Renderer/lib/Any/Renderer.pm ( view source; MetaCPAN )
 include:

	- XML (via XML::Simple)
	- XML+XSLT
	- Data::Dumper
	- Javascript, Javascript::Anon & JSON
	- UrlEncoded
	- The formats supported by Data::Serializer (e.g. Config::General and Config::Wres
WWW-DataWiki ( T/TO/TOBYINK/WWW-DataWiki-0.001.tar.gz, TOBYINK, 2011; MetaCPAN )
WWW-DataWiki/lib/WWW/DataWiki/Trait/ResultSet.pm ( view source; MetaCPAN )
'application/sparql-results+xml', undef, 'utf-8'],
			[WWW::DataWiki::FMT_RS_JSON,  0.9, 'application/x-sparql-results+json', undef, 'utf-8'],
			[WWW::DataWiki::FMT_RS_TEXT,  0.6, 'text/plain', undef
s+xml',
			'.xhtml'=> 'application/xhtml+xml',
			'.html' => 'text/html',
			'.json' => 'application/x-sparql-results+json',
			'.txt'  => 'text/plain',
			'.csv'  => 'text/csv',
			'.tab'  => 'text/t
s_string_as ($fmt)
	{
		my $str;
		given ($fmt)
		{
			when (WWW::DataWiki::FMT_RS_JSON)  { $str = $self->rs->as_json; }
			when (WWW::DataWiki::FMT_RS_XML)   { $str = $self->rs->as_xml; }
			when (WW
WWW-DataWiki ( T/TO/TOBYINK/WWW-DataWiki-0.001.tar.gz, TOBYINK, 2011; MetaCPAN )
WWW-DataWiki/lib/WWW/DataWiki/Trait/RdfModel.pm ( view source; MetaCPAN )
WWW::DataWiki::FMT_NT,    0.6, 'text/plain',  undef, 'utf-8'],
			[WWW::DataWiki::FMT_JSON,  0.6, 'application/json',      undef, 'utf-8'],
			[WWW::DataWiki::FMT_XML,   0.6, 'application/rdf+xml',   
ation/rdf+xml',
			'.xhtml'=> 'application/xhtml+xml',
			'.html' => 'text/html',
			'.json' => 'application/json',
			};
	}

	method rdf_string_conforms_to ($format)
	{
		return 1 if $format eq WWW::
Mail-Builder-Simple ( T/TE/TEDDY/Mail-Builder-Simple-0.16.tar.gz, TEDDY, 2011; MetaCPAN )
Mail-Builder-Simple/lib/Mail/Builder/Simple.pm ( view source; MetaCPAN )
 any type of file supported by L<Config::Any|Config::Any>: Apache config style (Config::General), JSON, INI files, XML, YAML or perl code.

Here is an example of a configuration file that uses L<Confi
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

#===================================================================
WWW-DataWiki ( T/TO/TOBYINK/WWW-DataWiki-0.001.tar.gz, TOBYINK, 2011; MetaCPAN )
WWW-DataWiki/lib/WWW/DataWiki/Controller/Page.pm ( view source; MetaCPAN )
-9-]*[a-z0-9])(?:/[a-z][a-z0-9-]*[a-z0-9])*)';
	our $RE_ext  = '(\.nt|\.n3|\.ttl|\.x?html|\.xml|\.json|\.txt|\.csv|\.tab)';
	our $RE_path = "${RE_page}${RE_ext}?";
	our $RE_vid  = '(\d{4}(?:\d{2}(?:\d
plication/sparql-update, text/n3, text/turtle, text/plain, application/rdf+xml;q=0.5, application/json;q=0.1, application/xhtml+xml;q=0.1, text/html;q=0.1'});
		}
	}

	action wikipage_PATCH
	{
		my ($
s.',
				{'X-Accept' => 'text/n3, text/turtle, text/plain, application/rdf+xml;q=0.5, application/json;q=0.1, application/xhtml+xml;q=0.1, text/html;q=0.1'});
		}
	}

	action wikipage_DELETE
	{
		my (
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.