sub format_available {
return $format_available if defined $format_available;
+ unless (IPC::Cmd->can_capture_buffer) {
+ my $msg = 'IPC::Cmd must be able to capture buffers.';
+ unless (do { local $@; eval { require IPC::Run; 1 } }) {
+ $msg .= ' Try installing IPC::Run (dev-perl/IPC-Run on Gentoo).';
+ }
+ __PACKAGE__->_abort($msg);
+ return $format_available = 0;
+ }
+
for my $prog (qw<emerge ebuild>) {
unless (IPC::Cmd::can_run($prog)) {
__PACKAGE__->_abort("$prog is required to write ebuilds");
}
}
- if (IPC::Cmd->can_capture_buffer) {
+ {
my $buffers;
my ($success, $errmsg) = IPC::Cmd::run(
command => [ qw<emerge --info> ],