#!perl

use strict;
use warnings;

use ScriptX 'Run' => {
    command => [{log=>1}, 'ls', '-l'],
};

ScriptX->run;

# ABSTRACT: Run a command
# PODNAME: scriptx-eg-run-command

__END__

=pod

=encoding UTF-8

=head1 NAME

scriptx-eg-run-command - Run a command

=head1 VERSION

This document describes version 0.000001 of scriptx-eg-run-command (from Perl distribution ScriptX), released on 2020-09-03.

=head1 SYNOPSIS

 % script-eg-run-command
 ...

=head1 DESCRIPTION

This script loads the L<ScriptX::Run> plugin to run something. The plugin
accepts a coderef (C<code>) or a string/array for external command (passed to
L<IPC::System::Options>'s C<system()>). Alternatively, it can search for
C<run()> in the C<main> package. In this script, we provide the first option.

To see the logs, you can use L<Log::ger::Screen>:

 % PERL5OPT=-MLog::ger::Screen TRACE=1 script-eg-run-command

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/ScriptX>.

=head1 SOURCE

Source repository is at L<https://github.com/perlancar/perl-ScriptX>.

=head1 BUGS

Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=ScriptX>

When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.

=head1 AUTHOR

perlancar <perlancar@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2020 by perlancar@cpan.org.

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
