Consul-Simple

 view release on metacpan or  search on metacpan

META.yml  view on Meta::CPAN

  ExtUtils::MakeMaker: 0
dynamic_config: 0
generated_by: 'Dist::Zilla version 5.020, CPAN::Meta::Converter version 2.142060'
license: perl
meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: 1.4
name: Consul-Simple
requires:
  Data::Dumper: 0
  HTTP::Request::Common: 0
  HTTP::Response: 0
  JSON: 0
  LWP::UserAgent: 0
  MIME::Base64: 0
  strict: 0
  warnings: 0
resources:
  bugtracker: https://github.com/dana/perl-Consul-Simple/issues
  homepage: https://github.com/dana/perl-Consul-Simple
  repository: https://github.com/dana/perl-Consul-Simple.git

Makefile.PL  view on Meta::CPAN

  "AUTHOR" => "Dana M. Diederich <dana\@realms.org>",
  "CONFIGURE_REQUIRES" => {
    "ExtUtils::MakeMaker" => 0
  },
  "DISTNAME" => "Consul-Simple",
  "EXE_FILES" => [],
  "LICENSE" => "perl",
  "NAME" => "Consul::Simple",
  "PREREQ_PM" => {
    "Data::Dumper" => 0,
    "HTTP::Request::Common" => 0,
    "HTTP::Response" => 0,
    "JSON" => 0,
    "LWP::UserAgent" => 0,
    "MIME::Base64" => 0,
    "strict" => 0,
    "warnings" => 0
  },
  "TEST_REQUIRES" => {
    "Test::More" => 0,
    "lib" => 0
  },
  "VERSION" => "1.142430",
  "test" => {
    "TESTS" => "t/*.t"
  }
);


my %FallbackPrereqs = (
  "Data::Dumper" => 0,
  "HTTP::Request::Common" => 0,
  "HTTP::Response" => 0,
  "JSON" => 0,
  "LWP::UserAgent" => 0,
  "MIME::Base64" => 0,
  "Test::More" => 0,
  "lib" => 0,
  "strict" => 0,
  "warnings" => 0
);

lib/Consul/Simple.pm  view on Meta::CPAN

package Consul::Simple;
$Consul::Simple::VERSION = '1.142430';
use strict;use warnings;
use LWP::UserAgent;
use HTTP::Response;
use HTTP::Request::Common;
use MIME::Base64;
use JSON;
use Data::Dumper;

sub new {
    my $class = shift;
    my $self = {};
    bless ($self,$class);
    my %args;
    {   my @args = @_;

lib/Consul/Simple.pm  view on Meta::CPAN

    die 'Consul::Simple::KVDelete: key required as first argument' unless defined $key;
    my %args;
    {   my @args = @_;
        die 'Consul::Simple::KVPut: even number of arguments required'
            if scalar @args % 2;
        %args = @args;
    }
    my $url = $self->_mk_kv_url($key);
    $url .= '?recurse' if $args{recurse};
    my $res = $self->_do_request(
        HTTP::Request::Common::_simple_req(
            'DELETE',
            $url
        )
    );
    return $res;
}
1;

__END__



( run in 0.441 second using v1.01-cache-2.11-cpan-de7293f3b23 )