system($quote->(@command)) and die"Could not run command @command"ifnot $opts{dry_run};
} else{
my$command= $self->{command};
print"$command\n"ifnot $opts{quiet};
system($command) and die"Could not run command $command"ifnot $opts{dry_run};
}
return;
}
1;
#ABSTRACT: An action object for external commands
__END__
=pod
=encoding UTF-8
=head1 NAME
ExtUtils::Builder::Action::Command - An action object for external commands
=head1 VERSION
version 0.016
=head1 SYNOPSIS
my @cmd = qw/echo Hello World!/;
my $action = ExtUtils::Builder::Action::Command->new(command => \@cmd);
$action->execute;
say "Executed: ", join ' ', @{$_} for $action->to_command;
=head1 DESCRIPTION
This is a primitive action object wrapping an external command. The easiest way to use it is to serialize it to command, though it doesn't mind being executed right away. For more information on actions, see L<ExtUtils::Builder::Action|ExtUtils::Builder::Action>.
=head1 ATTRIBUTES
=head2 command
This is the command that should be run, represented as an array ref.
=for Pod::Coverage execute
to_command
to_code
preference
flatten
=head1 AUTHOR
Leon Timmermans <fawaka@gmail.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Leon Timmermans.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
Keyboard Shortcuts
Global
s
Focus search bar
?
Bring up this help dialog
GitHub
gp
Go to pull requests
gi
go to github issues (only if github is preferred repository)