1MooseX::Getopt::Meta::AUtsterribCuotnet:r:iTbruatMieotdo(s3PepeXmr:)l:GDeotcoupmte:n:tMaettiao:n:Attribute::Trait(3pm)
2
3
4
6 MooseX::Getopt::Meta::Attribute::Trait - Optional meta attribute trait
7 for custom option names
8
10 version 0.74
11
13 package App;
14 use Moose;
15
16 with 'MooseX::Getopt';
17
18 has 'data' => (
19 traits => [ 'Getopt' ],
20 is => 'ro',
21 isa => 'Str',
22 default => 'file.dat',
23
24 # tells MooseX::Getopt to use --somedata as the
25 # command line flag instead of the normal
26 # autogenerated one (--data)
27 cmd_flag => 'somedata',
28
29 # tells MooseX::Getopt to also allow --moosedata,
30 # -m, and -d as aliases for this same option on
31 # the commandline.
32 cmd_aliases => [qw/ moosedata m d /],
33
34 # Or, you can use a plain scalar for a single alias:
35 cmd_aliases => 'm',
36 );
37
39 This is a custom attribute metaclass trait which can be used to specify
40 a the specific command line flag to use instead of the default one
41 which MooseX::Getopt will create for you.
42
44 cmd_flag
45 Changes the command-line flag to be this value, instead of the default,
46 which is the same as the attribute name.
47
48 cmd_aliases
49 Adds more aliases for this command-line flag, useful for short options
50 and such.
51
52 has_cmd_flag
53 has_cmd_aliases
55 Bugs may be submitted through the RT bug tracker
56 <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Getopt> (or
57 bug-MooseX-Getopt@rt.cpan.org <mailto:bug-MooseX-Getopt@rt.cpan.org>).
58
59 There is also a mailing list available for users of this distribution,
60 at <http://lists.perl.org/list/moose.html>.
61
62 There is also an irc channel available for users of this distribution,
63 at "#moose" on "irc.perl.org" <irc://irc.perl.org/#moose>.
64
66 Stevan Little <stevan@iinteractive.com>
67
69 This software is copyright (c) 2007 by Infinity Interactive, Inc.
70
71 This is free software; you can redistribute it and/or modify it under
72 the same terms as the Perl 5 programming language system itself.
73
74
75
76perl v5.28.0 20M1o8o-s0e9X-:2:3Getopt::Meta::Attribute::Trait(3pm)