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