App-hopen
view release on metacpan or search on metacpan
lib/App/hopen.pm view on Meta::CPAN
use Data::Hopen qw(:default loadfrom *VERBOSE *QUIET);
use Data::Hopen::Scope::Hash;
use Data::Hopen::Scope::Environment;
use Data::Hopen::Util::Data qw(dedent forward_opts);
use Data::Dumper;
use File::Path::Tiny;
use File::stat ();
use Getopt::Long qw(GetOptionsFromArray :config gnu_getopt);
use Hash::Merge;
use Path::Class;
use Scalar::Util qw(looks_like_number);
BEGIN { $Data::Dumper::Indent = 1; } # DEBUG
# }}}1
# Documentation {{{1
=pod
=encoding UTF-8
lib/App/hopen.pm view on Meta::CPAN
# Process other arguments. The first two non-option arguments are dest
# dir and project dir, if --from and --to were not given.
$hrOptsOut->{DEST_DIR} //= $params{from}->[0] if @{$params{from}};
$hrOptsOut->{PROJ_DIR} //= $params{from}->[1] if @{$params{from}}>1;
# Sanity check VERBOSE2, and give it a default of 0
my $v2 = $hrOptsOut->{VERBOSE2} // 0;
$v2 = 1 if $v2 eq ''; # --verbose without value === --verbose=1
die "--verbose requires a positive numeric argument"
if (defined $v2) && ( !looks_like_number($v2) || (int($v2) < 0) );
$hrOptsOut->{VERBOSE2} = int($v2 // 0);
} #_parse_command_line() }}}2
# }}}1
# === Main worker code ================================================== {{{1
sub _execute_hopen_file { # Load and run a single hopen file {{{2
( run in 0.293 second using v1.01-cache-2.11-cpan-607d282f910 )