File: frobulate.pm

package info (click to toggle)
libmoosex-app-cmd-perl 0.34-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 372 kB
  • sloc: perl: 366; makefile: 2
file content (31 lines) | stat: -rw-r--r-- 600 bytes parent folder | download | duplicates (3)
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
27
28
29
30
31
package Test::MyCmd::Command::frobulate;
use Moose;

extends 'MooseX::App::Cmd::Command';

sub command_names {
    return qw(frobulate frob);
}

has foo_bar => (
    traits        => [qw(Getopt)],
    isa           => "Bool",
    is            => "ro",
    cmd_aliases   => "F",
    documentation => "enable foo-bar subsystem",
);

has widget => (
    traits        => [qw(Getopt)],
    isa           => "Str",
    is            => "ro",
    documentation => "set widget name",
);

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

    die "the widget name is " . $self->widget . " - @$arg\n";
}

1;