File: MySimple.pm

package info (click to toggle)
libapp-cmd-perl 0.338-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 516 kB
  • sloc: perl: 1,727; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 435 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package Test::MySimple;
use strict;
use warnings;
use parent 'App::Cmd::Simple';

our $VERSION = '0.123';

use Data::Dumper;

sub execute {
  my ($self, $opt, $args) = @_;

  local $Data::Dumper::Terse = 1;
  print Dumper([ $opt, $args ]);
}

sub validate_args {
  my ($self, $opt, $args) = @_;
  $self->usage_error("not enough args") unless @$args > 0;
}

sub opt_spec {
  return [ "fooble|f", "check all foobs for foobling" ],
}

1;