1MooseX::Getopt::Meta::AUtsterribCuotnet:r:iMNboouoGtseeetdXo:pP:teG(re3ltpomDp)otc:u:mMeenttaa:t:iAotntribute::NoGetopt(3pm)
2
3
4
6 MooseX::Getopt::Meta::Attribute::NoGetopt - Optional meta attribute for
7 ignoring parameters
8
10 version 0.74
11
13 package App;
14 use Moose;
15
16 with 'MooseX::Getopt';
17
18 has 'data' => (
19 metaclass => 'NoGetopt', # do not attempt to capture this param
20 is => 'ro',
21 isa => 'Str',
22 default => 'file.dat',
23 );
24
26 This is a custom attribute metaclass which can be used to specify that
27 a specific attribute should not be processed by "MooseX::Getopt". All
28 you need to do is specify the "NoGetopt" metaclass.
29
30 has 'foo' => (metaclass => 'MooseX::Getopt::Meta::Attribute::NoGetopt', ... );
31
32 Use 'traits' instead of 'metaclass'
33 You should rarely need to explicitly set the attribute metaclass. It is
34 much preferred to simply provide a trait (a role applied to the
35 attribute metaclass), which allows other code to further modify the
36 attribute by applying additional roles.
37
38 Therefore, you should first try to do this:
39
40 has 'foo' => (traits => ['NoGetopt', ...], ...);
41
42 Custom Metaclass alias
43 This now takes advantage of the Moose 0.19 feature to support custom
44 attribute metaclass. This means you can also use this as the NoGetopt
45 alias, like so:
46
47 has 'foo' => (metaclass => 'NoGetopt', cmd_flag => 'f');
48
50 Bugs may be submitted through the RT bug tracker
51 <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Getopt> (or
52 bug-MooseX-Getopt@rt.cpan.org <mailto:bug-MooseX-Getopt@rt.cpan.org>).
53
54 There is also a mailing list available for users of this distribution,
55 at <http://lists.perl.org/list/moose.html>.
56
57 There is also an irc channel available for users of this distribution,
58 at "#moose" on "irc.perl.org" <irc://irc.perl.org/#moose>.
59
61 Stevan Little <stevan@iinteractive.com>
62
64 This software is copyright (c) 2007 by Infinity Interactive, Inc.
65
66 This is free software; you can redistribute it and/or modify it under
67 the same terms as the Perl 5 programming language system itself.
68
69
70
71perl v5.32.0 Mo2o0s2e0X-:0:7G-e2t8opt::Meta::Attribute::NoGetopt(3pm)