App-perlall

 view release on metacpan or  search on metacpan

script/perlall  view on Meta::CPAN


For older perls special patches are applied to successfully build
them. C<archname> and the archlibs are extended by C<-debug> and
special git suffices. The installed perl binary and on windows
the F<perl.dll> ditto.

Platforms

I use and support perlall on cygwin, linux (debian+centos),
freebsd, openbsd and solaris, with bash, dash and ksh.
Supporting other platforms besides VMS should not be hard.
freebsd needs sudo from ports. mingw (strawberry) and msys
(mingw cross) support is planned.

Log Files

Most commands always create a log file with the command, platform
and version, like F<log.maketest-centos5-5.10.1d-nt> or
F<log.makeinstall-osx10.6.8-5.15.4>, F<log.build-osx10.6.8-5.15.4d-nt@30cb48da>.

In the L<B::C> perl-compiler distribution there are some post-processing scripts
F<status_upd>, F<store_rpt>, F<download-reports> for such logfiles.

Windows

Note in cmd.exe you need different quoting rules.

You can try:
    perlall do -e"""print $^O"""

But easier is:
    perlall do '-e"print $^O"'

=cut


sub setup {
  $_[0]->register_commands( {-ignore_prefix => '_'} );
  $_[0]->register('install', \&build, "alias to build");
  $_[0]->register('smoke', \&build, "(NYI) smoke [ perl<version><suffix> branch ]");
  $_[0]->unregister('basename'); #imported (bug)
}

sub App::Rad::Help::usage {
  return "\nUsage: ".basename($0)." [options] command [arguments]";
}

sub pre_process {
  my $c = shift;
  my $cmd = $c->cmd;

  # config defaults: for all
  $c->config->{PERLALL_PREFIX} = '/usr/local';
  # build only
  $c->config->{PERLALL_BUILDROOT} = '/usr/src/perl';
  if ($cmd eq 'init') {
    $c->config->{cpan} = 'cpan';
    # DBD::Gofer on linux needs Clone but does not check for it
    $c->config->{'init-modules'} = 'YAML Clone DBI DBD::SQLite CPAN::SQLite Devel::Platform::Info'
      .' Params::Util Bundle::CPANReporter2 Math::Round Params::Classify Bundle::CygwinVendor'
      .' YAML::XS List::MoreUtils DBIx::Class SQL::Abstract Module::Find Mouse MouseX::Types Modern::Perl'
      .' Task::Kensho';
    if (basename(Cwd::getcwd) =~/^B-C/ and -f "t/top100") {
      _auto_use("File::Slurp");
      $c->config->{'init-modules'} .= " "
	.join(" ",File::Slurp::read_file("t/top100"));
    }
  }
  my $sudo = $^O =~ /cygwin|msys|MSWin32/ ? "" : "sudo";
  $c->config->{sudo} = $sudo;
  if ($^O eq 'MSWin32') {
    $ENV{HOME} = $ENV{HOMEDRIVE} . $ENV{HOMEPATH} unless $ENV{HOME};
    $c->config->{PERLALL_PREFIX} = $Config{prefix};
    $c->config->{PERLALL_BUILDROOT} = $ENV{HOME}."\\perl5";
    # bindir should be in the path.
    if ($Config{installsitebin} and $Config{installsitebin} =~ $ENV{PATH}) {
      $c->config->{PERLALL_BINDIR} = $Config{installsitebin};
    } else {
      $c->config->{PERLALL_BINDIR} = $ENV{HOME}."\\perl5\\bin";
    }
  }

  # read .perlall config
  if ($cmd =~ /^build|config|uninstall|init|list|testvm|smoke|do|make.*$|cpan.*/) {
    for ( "/etc/perlall", "$ENV{HOME}/.perlall" ) {
      $c->_dot_perlall($_) if -f $_;
    }
    $c->config->{PERLALL_PREFIX} = '/usr/local'
      unless $c->config->{PERLALL_PREFIX};
    $c->config->{PERLALL_BINDIR} = $c->config->{PERLALL_PREFIX}."/bin"
      unless $c->config->{PERLALL_BINDIR};
    $c->config->{PERLALL_BUILDROOT} = '/usr/src/perl'
      unless $c->config->{PERLALL_BUILDROOT};
    $c->config->{'perl-git'} = $c->config->{PERLALL_BUILDROOT}.'/blead/perl-git'
      unless $c->config->{'perl-git'};
    $c->config->{'cdcperl'} = $c->config->{PERLALL_BUILDROOT}.'/blead/cperl'
      unless $c->config->{'cdcperl'};
    $c->config->{'perlall_timeout'} = 0 unless $c->config->{'perlall_timeout'};

    if ($c->is_command($cmd) and $cmd !~ /^list/) {
      # logging + locking
      my $d = Devel::Platform::Info->new->get_info();
      my $s = $d->{oslabel};
      my $v = $d->{osvers};
      if ($^O eq 'solaris' and !$s) {
	$s = "solaris";
	$v = $d->{kvers} if $v eq 'SunOS';
      }
      $v =~ s/^\D*//;     # strip non-number lead
      $v =~ s/[^\d\.]//g; # only numbers and dots
      $s = $s . $v;
      $s =~ s/[\s\(\)\[\}\[\]]//g;
      if ($^O eq 'cygwin') {
	$s = $d->{source}->{uname}->[2];
	$s =~ s/\(.+$//;
	$s = 'cygwin'.$s.'_'.$d->{source}->{uname}->[1]; # cygwin1.7.10s_winxp
      }
      $s = $^O unless $s;
      if ($cmd eq 'maketest') {
	$c->stash->{logprefix} = "log.test-".lc($s)."-";
      } else {

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

( run in 1.271 second using v1.00-cache-2.02-grep-82fe00e-cpan-d29e8ade9f55 )