#!perl

use strict;
use warnings;

use ScriptX (
    Rinci => {
        func => 'Perinci::Examples::gen_array',
    },
);

ScriptX->run;

# ABSTRACT: Generate array of numbers
# PODNAME: scriptx-rinci-eg-gen-array

__END__

=pod

=encoding UTF-8

=head1 NAME

scriptx-rinci-eg-gen-array - Generate array of numbers

=head1 VERSION

This document describes version 0.000 of scriptx-rinci-eg-gen-array (from Perl distribution ScriptX-Rinci), released on 2020-09-03.

=head1 SYNOPSIS

 % script-rinci-eg-gen-array --len 5
 4
 3
 1
 1
 2

=head1 DESCRIPTION

This script runs L<Perinci::Examples>'s C<gen_array> function.

Some things you can do with this script:

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

 % PERL5OPT=-MLog::ger::Screen TRACE=1 scriptx-rinci-eg-gen-array --len 3
 ...
 [scriptx] -> run_event({name=>"run"})
 [scriptx] [event run] [1/1] -> handler Rinci ...
 [scriptx] -> run_event({name=>"get_args",...
 [scriptx] Running on_success ...
 [scriptx] <- run_event(name=get_args)
 1
 2
 3
 [scriptx] [event run] [1/1] <- handler Rinci: [200,"OK",[1,2,3]] (success)
 [scriptx] <- run_event(name=run)

To see stash (including parsed command-line options), you can use
L<ScriptX::Debug::DumpStash> plugin:

 % SCRIPTX_IMPORT=-Debug::DumpStash@after_get_args PERL5OPT=-MLog::ger::Screen TRACE=1 scriptx-rinci-eg-gen-array --len 3
 ...
 [scriptx] -> run_event({name=>"run"})
 [scriptx] [event run] [1/1] -> handler Rinci ...
 [scriptx] -> run_event({name=>"get_args",...
 [scriptx] Running on_success ...
 [scriptx] [event after_get_args] [1/1] -> handler Debug::DumpStash ...
 { args => { len => "3" }, event => "after_get_args" }
 [scriptx] [event after_get_args] [1/1] <- handler Debug::DumpStash: [200,"OK"] (success)
 [scriptx] <- run_event(name=get_args)
 3
 1
 2
 [scriptx] [event run] [1/1] <- handler Rinci: [200,"OK",[3,1,2]] (success)
 [scriptx] <- run_event(name=run)

=head1 HOMEPAGE

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

=head1 SOURCE

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

=head1 BUGS

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

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
