Group
Extension

Matches 1

Confman ( M/MA/MASAHJI/Confman-0.04.tar.gz, MASAHJI, 2013; MetaCPAN )
Confman/lib/Confman/API.pm ( view source; MetaCPAN )
package Confman::API;

use strict;
use IO::File;
use JSON;
use REST::Client;
use MIME::Base64;
use Digest::MD5 qw(md5_hex);


sub new {
  my $class = shift;
  my $self = bless({}, ref($class) || $clas
g_dir} ||= "/etc/confman";
  $self->{json} = JSON->new->allow_nonref;
  $self;
}

sub config_path {
  my $self = shift;
  return $self->{config_dir} . "/config.json"
}

sub api_key {
  my $self = shif
g_path) {
    my $fh = IO::File->new($config_path);
    local $/ = undef;
    my $config = $self->json->decode(<$fh>);
    $fh->close();

    while(my ($key, $value) = each(%$config)) {
      $self->{

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