helm

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN

        'Data::UUID'            => '0',
        'DateTime'              => '0',
        'Fcntl'                 => '0',
        'File::Basename'        => '0',
        'File::HomeDir'         => '0',
        'File::Spec::Functions' => '0',
        'Getopt::Long'          => '0',
        'IO::File'              => '0',
        'IO::Pipe'              => '0',
        'Moose'                 => '1.14',
        'namespace::autoclean'  => '0',
        'Net::OpenSSH'          => '0',
        'Parallel::ForkManager' => '0',
        'Pod::Usage'            => '0',
        'Term::ANSIColor'       => '0',
        'Try::Tiny'             => '0',
        'URI'                   => '0',
    },
    recommends => {
        'AnyEvent::IRC::Client'  => '0',
        'Config::ApacheFormat'   => '0',

Changes  view on Meta::CPAN

Revision history for Helm

0.4 (June 28, 2011)
    + Added missing namespace::autoclean to the dependencies in Build.PL
      [M. Peters]

0.3 (May 5, 2011)
    + Added new param() and params() methods to Helm::Task so subclasses
      can pass information between validate(), setup(), execute() and
      teardown() phases [M. Peters]
    + Added a new --user option so you can switch the user (Github issue
      #5) [xsawyerx and M. Peters]
    + Fixed GitHub issue #4 that incorrectly identified a failure to
      load a config dependency as a failure to load the config module

META.json  view on Meta::CPAN

            "Getopt::Long" : 0,
            "IO::File" : 0,
            "IO::Pipe" : 0,
            "Moose" : "1.14",
            "Net::OpenSSH" : 0,
            "Parallel::ForkManager" : 0,
            "Pod::Usage" : 0,
            "Term::ANSIColor" : 0,
            "Try::Tiny" : 0,
            "URI" : 0,
            "namespace::autoclean" : 0,
            "perl" : "v5.8.0"
         }
      }
   },
   "provides" : {
      "Helm" : {
         "file" : "lib/Helm.pm",
         "version" : "0.4"
      },
      "Helm::Conf" : {

META.yml  view on Meta::CPAN

  Getopt::Long: 0
  IO::File: 0
  IO::Pipe: 0
  Moose: 1.14
  Net::OpenSSH: 0
  Parallel::ForkManager: 0
  Pod::Usage: 0
  Term::ANSIColor: 0
  Try::Tiny: 0
  URI: 0
  namespace::autoclean: 0
  perl: v5.8.0
resources:
  license: http://dev.perl.org/licenses/
version: 0.4

lib/Helm.pm  view on Meta::CPAN

package Helm;
use strict;
use warnings;
use Moose;
use Moose::Util::TypeConstraints qw(enum);
use URI;
use namespace::autoclean;
use Try::Tiny;
use File::Spec::Functions qw(catdir catfile tmpdir devnull);
use File::HomeDir;
use Net::OpenSSH;
use Fcntl qw(:flock);
use File::Basename qw(basename);
use Helm::Log;
use Helm::Server;
use Scalar::Util qw(blessed);
use Parallel::ForkManager;

lib/Helm/Conf.pm  view on Meta::CPAN

package Helm::Conf;
use strict;
use warnings;
use Moose;
use namespace::autoclean;
use Helm::Server;

has servers => (is => 'ro', writer => '_servers', isa => 'ArrayRef[Helm::Server]');

sub get_servers_by_roles {
    my ($self, $roles, $exclude) = @_;
    $exclude ||= [];
    return
      grep { $_->has_role(@$roles) && (!@$exclude || !$_->has_role(@$exclude)) } @{$self->servers};
}

lib/Helm/Conf/Loader.pm  view on Meta::CPAN

package Helm::Conf::Loader;
use strict;
use warnings;
use Moose;
use namespace::autoclean;

sub load {
    my ($class, $uri) = @_;
    die "You must implement the load() method in your child class!";
}

__PACKAGE__->meta->make_immutable;

1;

lib/Helm/Conf/Loader/helm.pm  view on Meta::CPAN

package Helm::Conf::Loader::helm;
use strict;
use warnings;
use Moose;
use namespace::autoclean;
use Try::Tiny;
use Config::ApacheFormat;
use Helm::Conf;
use Helm::Server;

BEGIN {
    eval { require Config::ApacheFormat };
    die "Could not load Config::ApacheFormat. "
      . "It must be installed to use Helm's built-in configuration format: $@"
      if $@;

lib/Helm/Log.pm  view on Meta::CPAN

package Helm::Log;
use strict;
use warnings;
use Moose;
use Moose::Util::TypeConstraints qw(enum);
use namespace::autoclean;

enum LOG_LEVEL => qw(debug info warn error);
has channels => (
    is      => 'ro',
    writer  => '_channels',
    isa     => 'ArrayRef[Helm::Log::Channel]',
    default => sub { [] },
);
has log_level => (
    is      => 'ro',

lib/Helm/Log/Channel.pm  view on Meta::CPAN

package Helm::Log::Channel;
use strict;
use warnings;
use Moose;
use namespace::autoclean;

has uri            => (is => 'ro', writer => '_uri',            isa => 'URI');
has task           => (is => 'ro', writer => '_task',           isa => 'Str');
has current_server => (is => 'ro', writer => '_current_server', isa => 'Helm::Server|Undef');

sub initialize {
    my ($self, $helm) = @_;
    die "You must implement the initialize() method in your child class " . ref($self) . "!";
}

lib/Helm/Log/Channel/console.pm  view on Meta::CPAN

package Helm::Log::Channel::console;
use strict;
use warnings;
use Moose;
use Term::ANSIColor qw(colored color);
use IO::Pipe;
use AnyEvent;
use namespace::autoclean;

extends 'Helm::Log::Channel';
has pipes       => (is => 'ro', writer => '_pipes', isa     => 'HashRef');
has fh          => (is => 'ro', writer => '_fh');
has is_parallel => (is => 'rw', isa    => 'Bool',   default => 0);

my $LINE = '-' x 70;

sub initialize {
    my ($self, $helm) = @_;

lib/Helm/Log/Channel/email.pm  view on Meta::CPAN

package Helm::Log::Channel::email;
use strict;
use warnings;
use Moose;
use namespace::autoclean;
use DateTime;

BEGIN {
    eval { require Email::Simple };
    die "Could not load Email::Simple. It must be installed to use Helm's email logging" if $@;
    eval { require Email::Simple::Creator };
    die "Could not load Email::Simple::Creator. It must be installed to use Helm's email logging" if $@;
    eval { require Email::Sender::Simple };
    die "Could not load Email::Sender::Simple. It must be installed to use Helm's email logging" if $@;
    eval { require Email::Valid };

lib/Helm/Log/Channel/file.pm  view on Meta::CPAN

package Helm::Log::Channel::file;
use strict;
use warnings;
use Moose;
use namespace::autoclean;
use DateTime;

extends 'Helm::Log::Channel';
has fh => (is => 'ro', writer => '_fh', isa => 'FileHandle|Undef');

sub initialize {
    my ($self, $helm) = @_;

    # file the file and open it for appending
    my $file = $self->uri->file;

lib/Helm/Log/Channel/irc.pm  view on Meta::CPAN

package Helm::Log::Channel::irc;
use strict;
use warnings;
use Moose;
use namespace::autoclean;
use DateTime;
use AnyEvent;
use IO::Pipe;

BEGIN {
    eval { require AnyEvent::IRC::Client };
    die "Could not load AnyEvent::IRC::Client. It must be installed to use Helm's irc logging"
      if $@;
}

lib/Helm/Task.pm  view on Meta::CPAN

package Helm::Task;
use strict;
use warnings;
use Moose;
use namespace::autoclean;
use Data::UUID;
use File::Spec::Functions qw(catfile);

has helm => (is => 'ro', writer => '_helm', isa => 'Helm');

# must be implemented in child classes
sub execute {
    my ($self, %args) = @_;
    die "You must implement the execute method in your child class " . ref($self) . "!";
}

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.284 second using v1.00-cache-1.14-grep-28634ff-cpan-b2b8777cff0 )