Group
Extension

Matches 35359

Ubic ( M/MM/MMCLERIC/Ubic-1.60.tar.gz, MMCLERIC, 2016; MetaCPAN )
Ubic/lib/Ubic/Persistent.pm ( view source; MetaCPAN )
tence object


use JSON;
use Ubic::Lockf;
use Ubic::AtomicFile;

{
    # support the compatibility with JSON.pm v1 just because we can
    # see also: Ubic::ServiceLoader::Ext::json
    no strict;
   
   sub jsonToObj; *jsonToObj = (*{JSON::from_json}{CODE}) ? \&JSON::from_json : \&JSON::jsonToObj;
    sub objToJson; *objToJson = (*{JSON::to_json}{CODE}) ? \&JSON::to_json : \&JSON::objToJson;
}

my
+)};
        $data = { status => $status, enabled => $enabled };
    }
    else {
        $data = jsonToObj($str);
    }

    return $data;
}

sub load {
    my ($class, $fname) = @_;
    return _load
OAuth-Lite2 ( R/RI/RITOU/OAuth-Lite2-0.11.tar.gz, RITOU, 2016; MetaCPAN )
OAuth-Lite2/lib/OAuth/Lite2/Client/WebServer.pm ( view source; MetaCPAN )
gent(
            join "/", __PACKAGE__, $OAuth::Lite2::VERSION);
    }

    $self->{format} ||= 'json';
    $self->{response_parser} = OAuth::Lite2::Client::TokenResponseParser->new;
    $self->{stat
OAuth-Lite2 ( R/RI/RITOU/OAuth-Lite2-0.11.tar.gz, RITOU, 2016; MetaCPAN )
OAuth-Lite2/lib/OAuth/Lite2/Client/ClientCredentials.pm ( view source; MetaCPAN )
nt(
            join "/", __PACKAGE__, $OAuth::Lite2::VERSION);
    }

    # $self->{format} ||= 'json';
    $self->{response_parser} = OAuth::Lite2::Client::TokenResponseParser->new;

    return $sel
OAuth-Lite2 ( R/RI/RITOU/OAuth-Lite2-0.11.tar.gz, RITOU, 2016; MetaCPAN )
OAuth-Lite2/lib/OAuth/Lite2/Client/ExternalService.pm ( view source; MetaCPAN )
nt(
            join "/", __PACKAGE__, $OAuth::Lite2::VERSION);
    }

    # $self->{format} ||= 'json';
    $self->{response_parser} = OAuth::Lite2::Client::TokenResponseParser->new;

    return $sel
CPAN-Meta ( D/DA/DAGOLDEN/CPAN-Meta-2.150010.tar.gz, DAGOLDEN, 2016; MetaCPAN )
CPAN-Meta/lib/CPAN/Meta/Feature.pm ( view source; MetaCPAN )
n optional feature offered by a CPAN
#pod distribution and specified in the distribution's F<META.json> (or F<META.yml>)
#pod file.
#pod
#pod For the most part, this class will only be used when opera
bes an optional feature offered by a CPAN
distribution and specified in the distribution's F<META.json> (or F<META.yml>)
file.

For the most part, this class will only be used when operating on the re
Process-Results ( M/MI/MIKO/Process-Results-0.2.tar.gz, MIKO, 2016; MetaCPAN )
Process-Results/lib/Process/Results.pod ( view source; MetaCPAN )
; # returns false

=item * json

You can pass in a json string which will be parsed and used to populate the new
object. For example:

 $results = Process::Results->new(json=>'{"errors":[{"id":"no-fil
<success> proeperty.

=head2 json()

C<< $results-E<gt>json() >> returns a JSON representation of the results object.
That's all, it takes no params, it just returns a JSON string.

OK, one minor thin
g to note is that the C<success> property is set to the JSON
value of C<true> or C<false>. Other then that, nothing complicated.

=head1 TERMS AND CONDITIONS

Copyright (c) 2016 by Miko O'Sullivan. Al
Process-Results ( M/MI/MIKO/Process-Results-0.2.tar.gz, MIKO, 2016; MetaCPAN )
Process-Results/lib/Process/Results.pm ( view source; MetaCPAN )
package Process::Results;
use strict;
use Carp 'croak';
use B;
use JSON::Tiny;

# debug tools
# use Debug::ShowStuff ':all';
# use Debug::ShowStuff::ShowVar;

# version
our $VERSION = '0.2';

# config
; # returns false

=item * json

You can pass in a json string which will be parsed and used to populate the new
object. For example:

 $results = Process::Results->new(json=>'{"errors":[{"id":"no-fil
ults') {
			return $opts{'results'};
		}
	}
	
	# if json was sent, parse it
	if ( $opts{'json'} ) {
		$results = JSON::Tiny::decode_json($opts{'json'});
	}
	
	# else just create empty hashref
	else {
Rex-Repositorio ( J/JF/JFRIED/Rex-Repositorio-1.2.1.tar.gz, JFRIED, 2016; MetaCPAN )
Rex-Repositorio/lib/Rex/Repositorio/Server/Docker/Repository.pm ( view source; MetaCPAN )
r;
use File::Spec;
use File::Path 'make_path', 'remove_tree';
use File::Basename qw'dirname';
use JSON::XS;
use MIME::Base64;
require IO::All;

our $VERSION = '1.2.1'; # VERSION

sub get_repo_images {
catfile( $repo_dir, "repo.json" );

  if ( -f $repo_file ) {
    my $content = IO::All->new($repo_file)->slurp;
    $self->res->headers->add( 'Content-Type', 'application/json' );
    $self->render( t
   binmode $fh;
        print $fh $tx->res->body;
        close $fh;

        my $ref = $tx->res->json;
        my $repo_dir = $self->app->get_repo_dir( repo => $self->repo->{name} );
        for my $
Rex-Repositorio ( J/JF/JFRIED/Rex-Repositorio-1.2.1.tar.gz, JFRIED, 2016; MetaCPAN )
Rex-Repositorio/lib/Rex/Repositorio/Server/Docker/Index.pm ( view source; MetaCPAN )
ious::Controller';

our $VERSION = '1.2.1'; # VERSION

sub index {
  my ($self) = @_;
  $self->render( json => { ok => 1 } );
}

sub ping {
  my ($self) = @_;
  $self->render( text => 'true' );
}

1;
Rex-Repositorio ( J/JF/JFRIED/Rex-Repositorio-1.2.1.tar.gz, JFRIED, 2016; MetaCPAN )
Rex-Repositorio/lib/Rex/Repositorio/Server/Docker/Image.pm ( view source; MetaCPAN )
c;
use File::Path 'make_path', 'remove_tree';
use File::Basename 'basename';
require IO::All;
use JSON::XS;
use MIME::Base64;

our $VERSION = '1.2.1'; # VERSION

sub put_image {
  my ($self) = @_;

  
ages", $self->param("name") );
  my $image_json = File::Spec->catfile( $image_dir, "image.json" );

  make_path $image_dir;

  open( my $fh, ">", $image_json ) or die($!);
  print $fh $self->req->body
;
  close($fh);

  eval {
    my $ref = decode_json $self->req->body;
    if ( exists $ref->{parent} ) {
      symlink File::Spec->catfile( $repo_dir, "images", $ref->{parent} ),
        File::Spec->c
Rex-Repositorio ( J/JF/JFRIED/Rex-Repositorio-1.2.1.tar.gz, JFRIED, 2016; MetaCPAN )
Rex-Repositorio/lib/Rex/Repositorio/Server/Docker/Auth.pm ( view source; MetaCPAN )
move_tree';
use Digest::MD5 'md5_base64';
use Rex::Repositorio::Server::Docker::Helper::Auth;
use JSON::XS;
use Data::Dumper;

our $VERSION = '1.2.1'; # VERSION

# TODO: implement authentication and a
name} );
  my $user_dir = File::Spec->catdir( $repo_dir, "users" );

  my $ref      = $self->req->json;
  my $username = $ref->{username};

  if ( !-d File::Spec->catdir( $user_dir, $username ) ) {
  
( $user_dir, $username, "user.json" ) )
      or die($!);
    my $ref = $self->req->json;
    $ref->{password} = md5_base64( $ref->{password} );
    print $fh encode_json($ref);
    close($fh);

    $
Rex-Repositorio ( J/JF/JFRIED/Rex-Repositorio-1.2.1.tar.gz, JFRIED, 2016; MetaCPAN )
Rex-Repositorio/lib/Rex/Repositorio/Server/Yum/Errata.pm ( view source; MetaCPAN )
:Repositorio::Server::Yum::Errata;

use Mojo::Base 'Mojolicious::Controller';
use File::Spec;
use JSON::XS;
use List::MoreUtils 'firstidx';
use Data::Dumper;
require IO::All;

our $VERSION = '1.2.1'; 
->debug("Looking for errata: $errata_dir");

  if ( !-d $errata_dir ) {
    return $self->render( json => {}, status => 404 );
  }

  my $package = $self->param("package");
  my $arch    = $self->para
rch, substr( $package, 0, 1 ),
      $package, "errata.json"
    )
    )
  {
    return $self->render( json => {} );
  }

  my $ref = decode_json(
    IO::All->new(
      File::Spec->catfile(
        
Rex-Repositorio ( J/JF/JFRIED/Rex-Repositorio-1.2.1.tar.gz, JFRIED, 2016; MetaCPAN )
Rex-Repositorio/lib/Rex/Repositorio/Repository/OpenSuSE.pm ( view source; MetaCPAN )
Carp;
use Params::Validate qw(:all);
use File::Spec;
use File::Path 'make_path';
use IO::All;
use JSON::XS;

our $VERSION = '1.2.1'; # VERSION

extends "Rex::Repositorio::Repository::Yum";

sub mirror
Rex-Repositorio ( J/JF/JFRIED/Rex-Repositorio-1.2.1.tar.gz, JFRIED, 2016; MetaCPAN )
Rex-Repositorio/lib/Rex/Repositorio/Server/Docker/Search.pm ( view source; MetaCPAN )
::Docker::Search;

use Mojo::Base 'Mojolicious::Controller';
use File::Spec;
require IO::All;
use JSON::XS;
use Data::Dumper;

our $VERSION = '1.2.1'; # VERSION

sub search {
  my ($self) = @_;

  my 
Spec->catdir( $self->app->get_repo_dir( repo => $self->repo->{name} ),
    "repository" );

  my @json_files;
  my @dirs = ($repo_dir);
  for my $dir (@dirs) {
    opendir( my $dh, $dir );
    while (
  }
      if ( -f File::Spec->catfile( $dir, $entry, "repo.json" ) ) {
        push @json_files, File::Spec->catfile( $dir, $entry, "repo.json" );
      }
    }
    closedir($dh);
  }

  my $search = 
Rex-Repositorio ( J/JF/JFRIED/Rex-Repositorio-1.2.1.tar.gz, JFRIED, 2016; MetaCPAN )
Rex-Repositorio/lib/Rex/Repositorio/Server/Helper/Common.pm ( view source; MetaCPAN )
:Validate qw(:all);
use File::Spec;
use JSON::XS;

sub register {
  my ( $self, $app ) = @_;

  $app->helper(
    config => sub {
      my $config = decode_json( $ENV{REPO_CONFIG} );
      return $con
Rex-Repositorio ( J/JF/JFRIED/Rex-Repositorio-1.2.1.tar.gz, JFRIED, 2016; MetaCPAN )
Rex-Repositorio/lib/Rex/Repositorio/Repository/Plain.pm ( view source; MetaCPAN )
Carp;
use Params::Validate qw(:all);
use File::Spec;
use File::Path 'make_path';
use IO::All;
use JSON::XS;
use Mojo::DOM;

our $VERSION = '1.2.1'; # VERSION

extends "Rex::Repositorio::Repository::Ba
Business-Giropay ( S/SY/SYSPETE/Business-Giropay-0.103.tar.gz, SYSPETE, 2016; MetaCPAN )
Business-Giropay/lib/Business/Giropay/Role/Response.pm ( view source; MetaCPAN )
be Str/;
use JSON::MaybeXS;
use Moo::Role;
with 'Business::Giropay::Role::Network';

=head1 ATTRIBUTES

=head2 json

The json message data returned from giropay. Required.

=cut

has json => (
    is 

L</json> data converted to a hash reference.

=cut

has data => (
    is       => 'lazy',
    isa      => HashRef,
    init_arg => undef,
);

sub _build_data {
    return decode_json( shift->json );
= hmac_md5_hex( $self->json, $self->secret );

    croak(
        "Returned HMAC hash ", $self->hash,
        " does not match expected hash ", $verify, " for json ", $self->json
    ) unless $verify 
XAS-Collector ( K/KE/KESTEB/XAS-Collector-0.03.tar.gz, KESTEB, 2016; MetaCPAN )
XAS-Collector/lib/XAS/Collector/Output/Socket/Logstash.pm ( view source; MetaCPAN )
  => 0,
  version => $VERSION,
  base    => 'XAS::Collector::Output::Socket::Base',
  codec   => 'JSON',
;

#use Data::Dumper;

# ----------------------------------------------------------------------
Meta-Grapher-Moose ( D/DR/DROLSKY/Meta-Grapher-Moose-1.03.tar.gz, DROLSKY, 2016; MetaCPAN )
Meta-Grapher-Moose/lib/Meta/Grapher/Moose/Renderer/Graphviz.pm ( view source; MetaCPAN )
tr',
);

# TODO: Make this configurable from the command line, either by accepting some
# sort of JSON-as-command-line-argument-flag setting, or by having multiple
# attributes that *are* individually
Rex-Repositorio ( J/JF/JFRIED/Rex-Repositorio-1.2.1.tar.gz, JFRIED, 2016; MetaCPAN )
Rex-Repositorio/lib/Rex/Repositorio/Server/Docker/Mojolicious/Plugin/DockerSession.pm ( view source; MetaCPAN )
icious::Plugin';
use Data::Dumper;
use File::Spec;
use File::Path 'make_path', 'remove_tree';
use JSON::XS;
require IO::All;

sub register {
  my ( $self, $app ) = @_;

  my $session_dir =
    File::S
r, $session_id );
          if ( $session_id && -f $session_file ) {
            my $ref = decode_json( IO::All->new($session_file)->slurp );
            $self->stash( "session_token",         $sessio
n_dir;
        }

        open( my $fh, ">", $session_file ) or die($!);
        print $fh encode_json(
          {
            token => $self->stash->{session_token},
            user  => $self->stas

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