App-Cmdline

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "Pod::Usage" : "0",
            "Sub::Install" : "0",
            "parent" : "0",
            "perl" : "5.006",
            "strict" : "0",
            "warnings" : "0"
         }
      },
      "test" : {
         "requires" : {
            "Data::Dumper" : "0",
            "File::Find" : "0",
            "File::Temp" : "0",
            "Test::More" : "0"
         }
      }
   },
   "release_status" : "stable",
   "resources" : {
      "bugtracker" : {
         "web" : "http://github.com/msenger/App-Cmdline/issues"

META.yml  view on Meta::CPAN

---
abstract: 'helper for writing command-line applications'
author:
  - 'Martin Senger <martin.senger@gmail.com>'
build_requires:
  Data::Dumper: 0
  File::Find: 0
  File::Temp: 0
  Test::More: 0
configure_requires:
  ExtUtils::MakeMaker: 6.30
dynamic_config: 0
generated_by: 'Dist::Zilla version 4.300034, CPAN::Meta::Converter version 2.120921'
license: perl
meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html

Makefile.PL  view on Meta::CPAN

    "App::Cmd::Simple" => 0,
    "Getopt::Long" => 0,
    "Pod::Find" => 0,
    "Pod::Usage" => 0,
    "Sub::Install" => 0,
    "parent" => 0,
    "strict" => 0,
    "warnings" => 0
  },
  "TEST_REQUIRES" => {
    "Data::Dumper" => 0,
    "File::Find" => 0,
    "File::Temp" => 0,
    "Test::More" => 0
  },
  "VERSION" => "0.1.2",
  "test" => {
    "TESTS" => "t/*.t"
  }
);

README  view on Meta::CPAN

           return $self->check_for_duplicates (
               [ 'check|c' => "only check the configuration"  ],
               $self->composed_of (
                   'App::Cmdline::Options::Basic',
                   'App::Cmdline::Options::DB',
               )
           );
       }

       # The main job is implemented here
       use Data::Dumper;
       sub execute {
           my ($self, $opt, $args) = @_;

           print STDERR "Started...\n" unless $opt->quiet;
           print STDOUT 'Options ($opt):    ' . Dumper ($opt);
           print STDOUT 'Arguments ($args): ' . Dumper ($args);
           ...
       }

DESCRIPTION

docs/App-Cmdline.html  view on Meta::CPAN

       return $self-&#62;check_for_duplicates (
           [ &#39;check|c&#39; =&#62; &#34;only check the configuration&#34;  ],
           $self-&#62;composed_of (
               &#39;App::Cmdline::Options::Basic&#39;,
               &#39;App::Cmdline::Options::DB&#39;,
           )
       );
   }

   # The main job is implemented here
   use Data::Dumper;
   sub execute {
       my ($self, $opt, $args) = @_;

       print STDERR &#34;Started...\n&#34; unless $opt-&#62;quiet;
       print STDOUT &#39;Options ($opt):    &#39; . Dumper ($opt);
       print STDOUT &#39;Arguments ($args): &#39; . Dumper ($args);
       ...
   }</pre>

<h1><a class='u' href='#___top' title='click to go to top of document'

lib/App/Cmdline.pm  view on Meta::CPAN

       return $self->check_for_duplicates (
           [ 'check|c' => "only check the configuration"  ],
           $self->composed_of (
               'App::Cmdline::Options::Basic',
               'App::Cmdline::Options::DB',
           )
       );
   }

   # The main job is implemented here
   use Data::Dumper;
   sub execute {
       my ($self, $opt, $args) = @_;

       print STDERR "Started...\n" unless $opt->quiet;
       print STDOUT 'Options ($opt):    ' . Dumper ($opt);
       print STDOUT 'Arguments ($args): ' . Dumper ($args);
       ...
   }

=head1 DESCRIPTION

t/01-testapp.t  view on Meta::CPAN

#!/usr/bin/env perl
use strict;
use warnings;

package TestApp;
use parent 'App::Cmdline';
use Data::Dumper;

#use Test::More qw(no_plan);
use Test::More tests => 11;

BEGIN {
    diag( "Inside TestApp" );
}
sub opt_spec {
    my $self = shift;
    ok (1);



( run in 0.303 second using v1.01-cache-2.11-cpan-4d50c553e7e )