1MooseX::Getopt::Dashes(U3spemr)Contributed Perl DocumentMaotoisoenX::Getopt::Dashes(3pm)
2
3
4

NAME

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

VERSION

10       version 0.75
11

SYNOPSIS

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

DESCRIPTION

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

SUPPORT

45       Bugs may be submitted through the RT bug tracker
46       <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Getopt> (or
47       bug-MooseX-Getopt@rt.cpan.org <mailto:bug-MooseX-Getopt@rt.cpan.org>).
48
49       There is also a mailing list available for users of this distribution,
50       at <http://lists.perl.org/list/moose.html>.
51
52       There is also an irc channel available for users of this distribution,
53       at "#moose" on "irc.perl.org" <irc://irc.perl.org/#moose>.
54

AUTHOR

56       Stevan Little <stevan@iinteractive.com>
57
59       This software is copyright (c) 2007 by Infinity Interactive, Inc.
60
61       This is free software; you can redistribute it and/or modify it under
62       the same terms as the Perl 5 programming language system itself.
63
64
65
66perl v5.36.0                      2023-01-20       MooseX::Getopt::Dashes(3pm)
Impressum