File: C2.pm

package info (click to toggle)
libur-perl 0.470%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,192 kB
  • sloc: perl: 61,814; javascript: 255; xml: 108; sh: 13; makefile: 9
file content (40 lines) | stat: -rwxr-xr-x 717 bytes parent folder | download | duplicates (5)
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
32
33
34
35
36
37
38
39
40
use Command::V2;
use strict;
use warnings;

package CmdTest::C2;
use CmdTest::Stuff;

class CmdTest::Thing {
    has => [ name => { is => 'Text' } ]
};

CmdTest::Thing->create(id => 111, name => 'one');
CmdTest::Thing->create(id => 222, name => 'two');
CmdTest::Thing->create(id => 333, name => 'three');

class CmdTest::C2 {
    is => 'Command::V2',
    has => [
        thing => { is => 'CmdTest::Thing', id_by => 'thing_id' },
    ],
    doc => "test command 2"
};

sub execute {
    my $self = shift;
    print "running $self with args: " . Data::Dumper::Dumper($self) . "\n";
    return 1;
}

if ($0 eq __FILE__) {
    exit __PACKAGE__->_cmdline_run(@ARGV)
}

sub help_detail {
    return "HELP DETAIL";
}


1;