Alien-ActiveMQ
view release on metacpan or search on metacpan
inc/Module/Install/AutoInstall.pm view on Meta::CPAN
while (my ($mod, $ver) = splice(@features_require, 0, 2)) {
push @deduped, $mod => $ver unless $seen{$mod}{$ver}++;
}
$self->requires(@deduped);
$self->makemaker_args( Module::AutoInstall::_make_args() );
my $class = ref($self);
$self->postamble(
"# --- $class section:\n" .
Module::AutoInstall::postamble()
);
}
sub installdeps_target {
my ($self, @args) = @_;
$self->include('Module::AutoInstall');
require Module::AutoInstall;
inc/Module/Install/Metadata.pm view on Meta::CPAN
$self->provides( %{ $build->find_dist_packages || {} } );
}
sub feature {
my $self = shift;
my $name = shift;
my $features = ( $self->{values}->{features} ||= [] );
my $mods;
if ( @_ == 1 and ref( $_[0] ) ) {
# The user used ->feature like ->features by passing in the second
# argument as a reference. Accomodate for that.
$mods = $_[0];
} else {
$mods = \@_;
}
my $count = 0;
push @$features, (
$name => [
map {
lib/Alien/ActiveMQ.pm view on Meta::CPAN
my $h = start \@cmd, \undef;
my $pid = $h->{KIDS}[0]{PID}; # FIXME!
# Spin until we can get a connection
my ( $stomp, $loop_count );
while ( !$stomp ) {
if ( $loop_count++ > $self->startup_timeout ) {
$h->signal("KILL");
die "Can't connect to ActiveMQ after trying "
. $self->startup_timeout
. " seconds.";
}
eval {
$stomp = Net::Stomp->new(
{
hostname => 'localhost',
port => 61613
}
);
};
if ($@) {
t/start_stop.t view on Meta::CPAN
$stomp->mock(new => sub {
$try++;
die "No connection";
});
my $amq = Alien::ActiveMQ::Mock->new;
is($amq->get_version_dir('5.9.9'), $_dist_dir->subdir('5.9.9'),
'Found newer version');
{
throws_ok { my $server = $amq->run_server('5.9.9'); }
qr /Can't connect to ActiveMQ after trying 3 seconds./,
'Server would not start';
}
use Data::Dumper;
is($try, 4, 'Found retries');
}
# Install one of our test versions.
sub _install_test_version {
my $version = shift;
( run in 1.021 second using v1.01-cache-2.11-cpan-39bf76dae61 )