Alien-ActiveMQ

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

    up.

0.00004
  * Adding missing deps, notably the requirement for java.

0.00003
  * Use Net::Stomp to tell when the daemon has started.

0.00002
  * Change script to not install if already installed by default
  * Add a --force flag to force installation
  * Change Makefile generation to try a default install on make install

0.00001 2009-05-17
  * Initial version

inc/Module/AutoInstall.pm  view on Meta::CPAN

BEGIN {
	$VERSION = '1.08';
}

# special map on pre-defined feature sets
my %FeatureMap = (
    ''      => 'Core Features',    # XXX: deprecated
    '-core' => 'Core Features',
);

# various lexical flags
my ( @Missing, @Existing,  %DisabledTests, $UnderCPAN, $InstallDepsTarget, $HasCPANPLUS );
my (
    $Config, $CheckOnly, $SkipInstall, $AcceptDefault, $TestOnly, $AllDeps,
    $UpgradeDeps
);
my ( $PostambleActions, $PostambleActionsNoTest, $PostambleActionsUpgradeDeps,
    $PostambleActionsUpgradeDepsNoTest, $PostambleActionsListDeps,
    $PostambleActionsListAllDeps, $PostambleUsed, $NoTest);

# See if it's a testing or non-interactive session

inc/Module/AutoInstall.pm  view on Meta::CPAN

    __PACKAGE__->install(
        [
            $Config
            ? ( UNIVERSAL::isa( $Config, 'HASH' ) ? %{$Config} : @{$Config} )
            : ()
        ],
        @Missing,
    );
}

# initialize various flags, and/or perform install
sub _init {
    foreach my $arg (
        @ARGV,
        split(
            /[\s\t]+/,
            $ENV{PERL_AUTOINSTALL} || $ENV{PERL_EXTUTILS_AUTOINSTALL} || ''
        )
      )
    {
        if ( $arg =~ /^--config=(.*)$/ ) {

inc/Module/AutoInstall.pm  view on Meta::CPAN

    my $installed = 0;

    require CPANPLUS::Backend;
    my $cp   = CPANPLUS::Backend->new;
    my $conf = $cp->configure_object;

    return unless $conf->can('conf') # 0.05x+ with "sudo" support
               or _can_write($conf->_get_build('base'));  # 0.04x

    # if we're root, set UNINST=1 to avoid trouble unless user asked for it.
    my $makeflags = $conf->get_conf('makeflags') || '';
    if ( UNIVERSAL::isa( $makeflags, 'HASH' ) ) {
        # 0.03+ uses a hashref here
        $makeflags->{UNINST} = 1 unless exists $makeflags->{UNINST};

    } else {
        # 0.02 and below uses a scalar
        $makeflags = join( ' ', split( ' ', $makeflags ), 'UNINST=1' )
          if ( $makeflags !~ /\bUNINST\b/ and eval qq{ $> eq '0' } );

    }
    $conf->set_conf( makeflags => $makeflags );
    $conf->set_conf( prereqs   => 1 );

    

    while ( my ( $key, $val ) = splice( @config, 0, 2 ) ) {
        $conf->set_conf( $key, $val );
    }

    my $modtree = $cp->module_tree;
    while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) {

inc/Module/AutoInstall.pm  view on Meta::CPAN

    _load_cpan();
    require Config;

    if (CPAN->VERSION < 1.80) {
        # no "sudo" support, probe for writableness
        return unless _can_write( MM->catfile( $CPAN::Config->{cpan_home}, 'sources' ) )
                  and _can_write( $Config::Config{sitelib} );
    }

    # if we're root, set UNINST=1 to avoid trouble unless user asked for it.
    my $makeflags = $CPAN::Config->{make_install_arg} || '';
    $CPAN::Config->{make_install_arg} =
      join( ' ', split( ' ', $makeflags ), 'UNINST=1' )
      if ( $makeflags !~ /\bUNINST\b/ and eval qq{ $> eq '0' } );

    # don't show start-up info
    $CPAN::Config->{inhibit_startup_message} = 1;

    # set additional options
    while ( my ( $opt, $arg ) = splice( @config, 0, 2 ) ) {
        ( $args{$opt} = $arg, next )
          if $opt =~ /^(?:force|notest)$/;    # pseudo-option
        $CPAN::Config->{$opt} = $arg;
    }

lib/Alien/ActiveMQ.pm  view on Meta::CPAN


method get_licence_filename($version) {
    return $self->get_license_filename($version);
}

method run_server($version) {
    my $dir = $self->get_version_dir($version);
      my @cmd = ( file( $dir, 'bin', 'activemq' ) );

      # Check if we need to use the console verb to get the command to start.
      my $consoleflag = $self->_check_output( [ @cmd, '--help' ], qr/(stop)/ );

      if ($consoleflag) {
        push @cmd, 'console';
    }

    # Start activemq in a subprocess
    $self->_output("Running @cmd");
    my $h = start \@cmd, \undef;

    my $pid = $h->{KIDS}[0]{PID}; # FIXME!
    # Spin until we can get a connection
    my ( $stomp, $loop_count );



( run in 2.428 seconds using v1.01-cache-2.11-cpan-94b05bcf43c )