File: Basic.pm

package info (click to toggle)
libcli-osprey-perl 0.08-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 200 kB
  • sloc: perl: 843; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 394 bytes parent folder | download
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
package MyTest::Class::Basic;

use Moo;
use CLI::Osprey;

option 'message' => (
    is => 'ro',
    format => 's',
    doc => 'The message to display',
    default => 'Hello world!',
);

subcommand yell => 'MyTest::Class::Basic::Yell';

subcommand whisper => sub {
    my ($self) = @_;
    print lc $self->message, "\n";
};

sub run {
    my ($self) = @_;
    print $self->message, "\n";
}

1;