App-WRT
view release on metacpan or search on metacpan
bin/wrt-feed view on Meta::CPAN
use utf8;
use open qw(:std :utf8);
# use Data::Dumper;
use App::WRT;
use Carp;
use Getopt::Long qw(GetOptionsFromArray);
use Pod::Usage;
# If invoked directly from the command-line, caller() will return undef.
# Execute main() with a callback to print output directly, and a copy of
# our real @ARGV:
if (not caller()) {
my $output = sub { say @_; };
my $retval = main($output, @ARGV);
exit($retval);
}
sub main {
my ($output, @local_argv) = @_;
# Handle options, including help generated from the POD above. See:
# - http://perldoc.perl.org/Getopt/Long.html#User-defined-subroutines-to-handle-options
# - https://metacpan.org/pod/Pod::Usage
use 5.10.0;
use strict;
use warnings;
use Getopt::Long qw(GetOptionsFromArray);
use Pod::Usage;
use App::WRT;
use Carp;
# If invoked directly from the command-line, caller() will return undef.
# Execute main() with a callback to print output directly, and a copy of
# our real @ARGV:
if (not caller()) {
my $output = sub { say @_; };
main($output, @ARGV);
exit(0);
}
# main() takes an output callback and an @ARGV to pass in to
# GetOptionsFromArray(). This allows relatively simple integration
# tests to be written. See also: t/bin-wrt-ls.t
sub main {
my ($output, @local_argv) = @_;
bin/wrt-render-all view on Meta::CPAN
use Getopt::Long;
use Pod::Usage;
use Time::HiRes;
use App::WRT;
use App::WRT::FileIO;
use App::WRT::Renderer;
my $start_time = [Time::HiRes::gettimeofday()];
# If invoked directly from the command-line, caller() will return undef.
# Execute main() with a callback to print output directly, a FileIO object,
# and a copy of our real @ARGV:
if (not caller()) {
my $output = sub { say @_; };
my $io = App::WRT::FileIO->new();
main($output, $io, @ARGV);
exit(0);
}
# main() takes an output callback, a FileIO object or equivalent, and an @ARGV
# to pass in to GetOptionsFromArray(). This allows relatively simple
# integration tests to be written. See also: t/bin-wrt-render-all.t
sub main {
bin/wrt-repl view on Meta::CPAN
use Getopt::Long qw(GetOptionsFromArray);
use Pod::Usage;
use App::WRT;
use Carp;
use Term::ReadLine;
use Data::Dumper;
$Carp::Verbose = 1;
if (not caller()) {
main(@ARGV);
exit(0);
}
sub main {
my (@local_argv) = @_;
# Handle options, including help generated from the POD above. See:
# - http://perldoc.perl.org/Getopt/Long.html#User-defined-subroutines-to-handle-options
# - https://metacpan.org/pod/Pod::Usage
( run in 0.339 second using v1.01-cache-2.11-cpan-26ccb49234f )