Alien-ActiveMQ
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
my $make = $Config::Config{make};
if ($InstallDepsTarget) {
print
"*** To install dependencies type '$make installdeps' or '$make installdeps_notest'.\n";
}
else {
print
"*** Dependencies will be installed the next time you type '$make'.\n";
}
# make an educated guess of whether we'll need root permission.
print " (You may need to do that as the 'root' user.)\n"
if eval '$>';
}
print "*** $class configuration finished.\n";
chdir $cwd;
# import to main::
no strict 'refs';
*{'main::WriteMakefile'} = \&Write if caller(0) eq 'main';
inc/Module/AutoInstall.pm view on Meta::CPAN
sub _has_cpanplus {
return (
$HasCPANPLUS = (
$INC{'CPANPLUS/Config.pm'}
or _load('CPANPLUS::Shell::Default')
)
);
}
# make guesses on whether we're under the CPAN installation directory
sub _under_cpan {
require Cwd;
require File::Spec;
my $cwd = File::Spec->canonpath( Cwd::cwd() );
my $cpan = File::Spec->canonpath( $CPAN::Config->{cpan_home} );
return ( index( $cwd, $cpan ) > -1 );
}
script/install-activemq view on Meta::CPAN
);
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.
# Otherwise, guess.
# None of this is done at all if the user gave a specific version, of course.
my $version_source = $self->has_tarball ? $self->tarball : undef;
if ( not defined $version_source ) {
$version_source = $self->has_download_uri ? $self->download_uri : undef;
}
return $DEFAULT_ACTIVEMQ_VERSION unless $version_source;
return $version_source =~ /activemq-(.+\d)/;
}
t/start_stop.t view on Meta::CPAN
return 1;
}
sub startup_timeout {
return 3;
}
package main;
ok (!Alien::ActiveMQ::Mock->is_version_installed(), 'No versions found');
is(Alien::ActiveMQ::Mock->get_version_dir(), undef, 'No version guessed');
ok (_install_test_version('5.1.9'), 'Installed 5.1.9');
ok (Alien::ActiveMQ::Mock->is_version_installed(), 'Found an installation');
is(Alien::ActiveMQ::Mock->get_version_dir(), $_dist_dir->subdir('5.1.9'),
'Found latest installed version');
is(Alien::ActiveMQ::Mock->get_license_filename(),
$_dist_dir->file('5.1.9', 'LICENSE'),
'Found latest license file');
is(Alien::ActiveMQ::Mock->get_licence_filename(),
( run in 0.392 second using v1.01-cache-2.11-cpan-702932259ff )