package Combust::Util;
use warnings;
use strict;
use base qw(Exporter);
use Carp qw(croak);

our @EXPORT_OK = qw(
   run
);

sub run {
    my @ar = @_;
    my $parms = ref $ar[-1] eq "HASH" ? pop @ar : {};

    print "Running: ", join(" ", @ar), "\n" unless $parms->{silent};

    return 1 if system(@ar) == 0;

    my $exit_value = $? >> 8;
    return 0
      if $parms->{fail_silent_if}
          && $exit_value == $parms->{fail_silent_if};

    my $msg = "system @ar failed: $exit_value ($?)";
    croak($msg) unless $parms->{failok};
    print "$msg\n";
    return 0;
}

1;

Add util class with `run` function
Add util class with `run` function
