Circle-Common

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

         }
      },
      "runtime" : {
         "requires" : {
            "File::Share" : "0.27",
            "File::ShareDir::Install" : "0.14",
            "JSON" : "4.10",
            "LWP::Protocol::https" : "6.14",
            "LWP::UserAgent" : "6.67",
            "Slurp" : "0.4",
            "Try::Tiny" : "0.31",
            "URL::Encode" : "0.03",
            "YAML" : "1.30",
            "perl" : "5.006"
         }
      },
      "test" : {
         "requires" : {
            "Test::More" : "0"
         }
      }

META.yml  view on Meta::CPAN

  directory:
    - t
    - inc
requires:
  File::Share: '0.27'
  File::ShareDir::Install: '0.14'
  JSON: '4.10'
  LWP::Protocol::https: '6.14'
  LWP::UserAgent: '6.67'
  Slurp: '0.4'
  Try::Tiny: '0.31'
  URL::Encode: '0.03'
  YAML: '1.30'
  perl: '5.006'
version: '0.06'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'

Makefile.PL  view on Meta::CPAN

        'ExtUtils::MakeMaker' => '0',
    },
    TEST_REQUIRES => {
        'Test::More' => '0',
    },
    PREREQ_PM => {
        'LWP::UserAgent'          => '6.67',
        'LWP::Protocol::https'    => '6.14',
        'YAML'                    => '1.30',
        'Slurp'                   => '0.4',
        'Try::Tiny'               => '0.31',
        'JSON'                    => '4.10',
        'URL::Encode'             => '0.03',
        'File::ShareDir::Install' => '0.14',
        'File::Share'             => '0.27',
    },
    test  => { TESTS    => 't/*.t t/*/*.t' },
    dist  => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
    clean => { FILES    => 'Circle-Common-*' },
);

lib/Circle/Common.pm  view on Meta::CPAN

package Circle::Common;

use 5.006;
use strict;
use warnings;
use Exporter 'import';
use URL::Encode qw(url_encode_utf8);
use LWP::UserAgent;
use HTTP::Request;
use Slurp;
use Try::Tiny;
use YAML;
use JSON;
use Carp;
use File::Share ':all';

our @EXPORT_OK = qw(
  load_config
  build_url_template
  http_json_post
  http_json_get

t/01-common.t  view on Meta::CPAN

#!perl
use 5.006;
use strict;
use warnings;
use Test::More;
use Carp;
use JSON;
use Try::Tiny;
use Circle::Common qw(load_config build_url_template http_json_get http_json_post);

my $config = load_config();
ok($config, "load config ok");
ok($config->{user}, "user config ok");
carp $config->{user}->{sessionPath};
is( $config->{user}->{sessionPath}, ".ccl/circle.properties" );

my $http = $config->{http};
my $block = $config->{block};



( run in 0.906 second using v1.01-cache-2.11-cpan-05444aca049 )