App-perlall

 view release on metacpan or  search on metacpan

script/perlall  view on Meta::CPAN

#!/usr/local/bin/perl
eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
    if 0; # not running under some shell

# XXX 5.20-24 do not work with App::Rad

#BEGIN {$DB::single=1} # debug into attribute handling
# TODO:
#   tee make test with -v (unbuffered IPC::Run or via fork-like callback?)
#   maketest or -q: mark FAIL tests *RED*, p line bold black (see t/testc.sh)
#   implement smoke, bench
#   maketest --all (locally and testvm --all)
#   more testvm_ctl: xen-shell, vmrun, VBoXManage
#   uninstall: packfile of installed files instead of rather unsafe globbing
#   cmd --help
#   get msys compiled, bootstrap a mingw perl without strawberry
#   build win32 from win32/
# TEST:
#   init-modules: \ handling and `` expansion
#   testvm logs back from forks
#   fix testvm forked and --fork arg
#   'perlall=5.8* perlall do -m' should filter only main 5.8*
#   testvm max balancing
#   init is unstable (IO::Tee in IPC::Run) - refactored
#   --as explicit and implicit - looks good, but no test
# non-critical TODO:
#   5.8.8 (centos5) fails with Attribute::Handler 0.78_02. monkeypatch or fail?
#   build: test perlbrew and HOME friendly (no hardcoded paths)
#   windows support (paths, tee, tools), die on other non-POSIX exots (VMS)...
#   CPAN::Shell->expand("Devel::*"), not easy todo with metacpan.

use strict;
use 5.006;
our $VERSION = '0.51';
use Config;
use Cwd ();
use File::Spec ();
use File::Basename 'basename';
use Fcntl ();

my @extuse;
BEGIN { # check platform support: perldoc perlport
  @extuse = qw(App::Rad IPC::Cmd IO::Scalar Devel::Platform::Info Devel::PatchPerl);
  if ($^O !~ /^linux|freebsd|darwin|solaris|openbsd|cygwin$/) {
    if ($^O =~ /^vms|dos|bsdos$/) {
      die "unsupported OS $^O"; # fixes welcome
    } elsif ($^O =~ /^MSWin32|msys/) {
      warn "$^O not yet fully supported\n";
    } else { # should theoretically work:
             #   netbsd sunos aix haiku beos hpux irix next svr4 unicos* plan9
             # scary: VOS os390 os400 posix-bc vmesa riscos amigaos mpeix
      warn "untested OS $^O. Feedback welcome";
      # VOS forbids slashes in filenames. no big deal
    }
  }
  sub _auto_use { # autoinstall the non-core modules, and use them
    my @m;
    for (@_) { push @m, $_ unless eval "require $_;" }
    if (@m) { # Checked the API back to 1.76_01 (v5.8.4)
      require CPAN; CPAN->import;
      # TODO: skip core modules, perl-5
      warn "CPAN::Shell->install(qw(@m))\n"; CPAN::Shell->install(@m); }
    $_->import for @m;
  }
  _auto_use( @extuse );



( run in 1.482 second using v1.01-cache-2.11-cpan-39bf76dae61 )