Alien-ActiveMQ

 view release on metacpan or  search on metacpan

script/install-activemq  view on Meta::CPAN

#!/usr/bin/env perl
package    # Hide package name from PAUSE
  Alien::ActiveMQ::Install;
use Moose;
use Method::Signatures::Simple;
use MooseX::Types::Moose qw/Str Bool/;
use MooseX::Types::Path::Class;
use Path::Class qw/file dir/;
use File::ShareDir qw/dist_dir/;
use File::Temp qw/tempdir/;
use LWP::Simple qw/get getstore/;
use Archive::Extract;
use File::Copy::Recursive qw/ dircopy /;
use namespace::autoclean;
use Const::Fast;

with 'MooseX::Getopt';

our $VERSION = '0.00005';

const my $DEFAULT_ACTIVEMQ_VERSION => '5.10.0';

has force => (
    isa => Bool,
    is => 'ro',
    default => 0,
);

has install_dir => (
    isa        => 'Path::Class::Dir',
    is         => 'ro',
    coerce     => 1,
    lazy_build => 1,
);

method _build_install_dir {
    dir( dist_dir('Alien-ActiveMQ'), $self->version_number );
}

has tarball => (
    isa        => 'Path::Class::File',
    is         => 'ro',
    coerce     => 1,
    lazy_build => 1
);

method _build_tarball {
    my $tarball = $self->download_uri;
    $tarball =~ s|.+/||;
    file( $self->_temp_dir, $tarball );
}

has version_number => (
    isa => Str,
    is => 'ro',
    required => 1,
    lazy_build => 1,
);

has script_name => (
    isa => Str,
    is => 'ro',
    required => 1,
    lazy_build => 1,
);

method _build_script_name {
    return file($0)->basename;
}

method _build_version_number {

   # If we have a tarball, use the version from that.
   # Otherwise, if we have a URI to download from, use the version from that.



( run in 1.225 second using v1.01-cache-2.11-cpan-e93a5daba3e )