migrated repository to github moose organization
[gitmo/MooseX-Getopt.git] / lib / MooseX / Getopt / Meta / Attribute / Trait / NoGetopt.pm
1 package MooseX::Getopt::Meta::Attribute::Trait::NoGetopt;
2 # ABSTRACT: Optional meta attribute trait for ignoring params
3
4 use Moose::Role;
5 no Moose::Role;
6
7 # register this as a metaclass alias ...
8 package # stop confusing PAUSE
9     Moose::Meta::Attribute::Custom::Trait::NoGetopt;
10 sub register_implementation { 'MooseX::Getopt::Meta::Attribute::Trait::NoGetopt' }
11
12 1;
13
14 =head1 SYNOPSIS
15
16   package App;
17   use Moose;
18
19   with 'MooseX::Getopt';
20
21   has 'data' => (
22       traits  => [ 'NoGetopt' ],  # do not attempt to capture this param
23       is      => 'ro',
24       isa     => 'Str',
25       default => 'file.dat',
26   );
27
28 =head1 DESCRIPTION
29
30 This is a custom attribute metaclass trait which can be used to
31 specify that a specific attribute should B<not> be processed by
32 C<MooseX::Getopt>. All you need to do is specify the C<NoGetopt>
33 metaclass trait.
34
35   has 'foo' => (traits => [ 'NoGetopt', ... ], ... );
36
37 =cut