1MooseX::Getopt::Dashes(U3s)er Contributed Perl DocumentatMiooonseX::Getopt::Dashes(3)
2
3
4

NAME

6       MooseX::Getopt::Dashes - convert underscores in attribute names to
7       dashes
8

SYNOPSIS

10         package My::App;
11         use Moose;
12         with 'MooseX::Getopt::Dashes';
13
14         # Will be called as --some-thingy, not --some_thingy
15         has 'some_thingy' => (
16             is      => 'ro',
17             isa     => 'Str',
18             default => 'foo'
19         );
20
21         # Will be called as --another_thingy, not --another-thingy
22         has 'another_thingy' => (
23             traits   => [ 'Getopt' ],
24             cmd_flag => 'another_thingy'
25             is       => 'ro',
26             isa      => 'Str',
27             default  => 'foo'
28         );
29
30         # use as MooseX::Getopt
31

DESCRIPTION

33       This is a version of "MooseX::Getopt" which converts underscores in
34       attribute names to dashes when generating command line flags.
35
36       You can selectively disable this on a per-attribute basis by supplying
37       a cmd_flag argument with the command flag you'd like for a given
38       attribute. No underscore to dash replacement will be done on the
39       "cmd_flag".
40

METHODS

42       meta
43

BUGS

45       All complex software has bugs lurking in it, and this module is no
46       exception. If you find a bug please either email me, or add the bug to
47       cpan-RT.
48

AUTHOR

50       Dagfinn Ilmari Mannsaaker <ilmari@ilmari.org>
51
52       Stevan Little <stevan@iinteractive.com>
53
54       Yuval Kogman  "<nuffin@cpan.org>"
55
56       var Arnfjoerd` Bjarmason <avar@cpan.org>
57
59       Copyright 2007-2008 by Infinity Interactive, Inc.
60
61       <http://www.iinteractive.com>
62
63       This library is free software; you can redistribute it and/or modify it
64       under the same terms as Perl itself.
65
66
67
68perl v5.12.0                      2010-03-01         MooseX::Getopt::Dashes(3)
Impressum