projects
/
gitmo/MooseX-Getopt.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Add test for strange --version handling
[gitmo/MooseX-Getopt.git]
/
t
/
version_with_options.pl
1
package WithOptions;
2
use Moose;
3
4
with 'MooseX::Getopt';
5
6
has print_version => (
7
traits => [qw(Getopt)],
8
isa => 'Bool',
9
is => 'ro',
10
cmd_flag => 'version',
11
cmd_aliases => 'v',
12
);
13
14
sub run {
15
my ($self) = @_;
16
17
if ($self->print_version) {
18
print "SUCCESS\n";
19
exit;
20
}
21
}
22
23
package main;
24
WithOptions->new_with_options;