App-ArduinoBuilder

 view release on metacpan or  search on metacpan

lib/App/ArduinoBuilder/System.pm  view on Meta::CPAN

  while ($cmd =~ m/ \G \s* (?: (['"])(?<p>.*?)\1 | (?<p>[^ ]+) ) /gx) {
    push @cmd, $+{p};
  }
  return @cmd;
}

sub execute_cmd {
  my ($cmd, %options) = @_;
  trace $cmd;
  if ($^O eq 'MSWin32') {
    # This fix cases where the command looks like: foo '--bar="baz"'
    #
    # TODO: Possibly we could just split the command using split_cmd
    # and then pass the list to system (and find something for the `` case).
    $cmd = quote_native(split_cmd($cmd));
  }
  my $failed;
  if (exists $options{capture_output}) {
    my $out = `${cmd}`;
    if (defined $out) {
      ${$options{capture_output}} = $out;



( run in 0.579 second using v1.01-cache-2.11-cpan-64827b87656 )