CLI-Startup
    
    
  
  
  
view release on metacpan or search on metacpan
lib/CLI/Startup.pm view on Meta::CPAN
use Exporter 'import';
our @EXPORT_OK = qw/startup/;
our $VERSION = '0.29';    # Don't forget to update the manpage version, too!
use Readonly;
Readonly my $V_FOR_VERBOSE => 'ALIAS OF VERBOSE';
Readonly my $V_OPTSPEC     => 'v+';
# Simple command-line processing with transparent
# support for config files.
sub startup
{
    my $optspec = shift;
    my $app = CLI::Startup->new($optspec);
    $app->init;
    return $app->get_options;
}
    
  
  
  lib/CLI/Startup.pm view on Meta::CPAN
CLI::Startup - Simple initialization for command-line scripts
=head1 VERSION
Version 0.29
=head1 SYNOPSIS
C<CLI::Startup> can export a single method, C<startup()>, into the
caller's namespace. It transparently handles config files, defaults,
and command-line options.
  use CLI::Startup 'startup';
  # Returns the merged results of defaults, config file
  # and command-line options.
  my $options = startup({
    'opt1=s' => 'Option taking a string',
    'opt2:i' => 'Optional option taking an integer',
    ...
    
  
  
  
( run in 0.919 second using v1.01-cache-2.11-cpan-a1d94b6210f )