1MooseX::Getopt::Meta::AUtsterribCuotnet:r:iTbruatietdM(o3Po)esrelX:D:oGceutmoepntt:a:tMieotna::Attribute::Trait(3)
2
3
4

NAME

6       MooseX::Getopt::Meta::Attribute::Trait - Optional meta attribute trait
7       for custom option names
8

SYNOPSIS

10         package App;
11         use Moose;
12
13         with 'MooseX::Getopt';
14
15         has 'data' => (
16             traits    => [ 'Getopt' ],
17             is        => 'ro',
18             isa       => 'Str',
19             default   => 'file.dat',
20
21             # tells MooseX::Getopt to use --somedata as the
22             # command line flag instead of the normal
23             # autogenerated one (--data)
24             cmd_flag  => 'somedata',
25
26             # tells MooseX::Getopt to also allow --moosedata,
27             # -m, and -d as aliases for this same option on
28             # the commandline.
29             cmd_aliases => [qw/ moosedata m d /],
30
31             # Or, you can use a plain scalar for a single alias:
32             cmd_aliases => 'm',
33         );
34

DESCRIPTION

36       This is a custom attribute metaclass trait which can be used to specify
37       a the specific command line flag to use instead of the default one
38       which MooseX::Getopt will create for you.
39

METHODS

41       These methods are of little use to most users, they are used interally
42       within MooseX::Getopt.
43
44       cmd_flag
45           Changes the commandline flag to be this value, instead of the
46           default, which is the same as the attribute name.
47
48       cmd_aliases
49           Adds more aliases for this commandline flag, useful for short
50           options and such.
51
52       has_cmd_flag
53       has_cmd_aliases
54       meta
55

BUGS

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

AUTHOR

62       Stevan Little <stevan@iinteractive.com>
63
65       Copyright 2007-2008 by Infinity Interactive, Inc.
66
67       <http://www.iinteractive.com>
68
69       This library is free software; you can redistribute it and/or modify it
70       under the same terms as Perl itself.
71
72
73
74perl v5.12.0                      2010M-o0o3s-e0X1::Getopt::Meta::Attribute::Trait(3)
Impressum