File Coverage

blib/lib/MouseX/Getopt/Meta/Attribute/Trait/NoGetopt.pm
Criterion Covered Total %
statement 7 7 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 10 10 100.0


line stmt bran cond sub pod time code
1             package MouseX::Getopt::Meta::Attribute::Trait::NoGetopt;
2             # ABSTRACT: Optional meta attribute trait for ignoring params
3              
4 22     22   8590 use Mouse::Role;
  22         27  
  22         100  
5 22     22   3875 no Mouse::Role;
  22         30  
  22         61  
6              
7             # register this as a metaclass alias ...
8             package # stop confusing PAUSE
9             Mouse::Meta::Attribute::Custom::Trait::NoGetopt;
10 20     20   9452 sub register_implementation { 'MouseX::Getopt::Meta::Attribute::Trait::NoGetopt' }
11              
12             1;
13              
14             =for stopwords metaclass commandline
15              
16             =head1 SYNOPSIS
17              
18             package App;
19             use Mouse;
20              
21             with 'MouseX::Getopt';
22              
23             has 'data' => (
24             traits => [ 'NoGetopt' ], # do not attempt to capture this param
25             is => 'ro',
26             isa => 'Str',
27             default => 'file.dat',
28             );
29              
30             =head1 DESCRIPTION
31              
32             This is a custom attribute metaclass trait which can be used to
33             specify that a specific attribute should B be processed by
34             C. All you need to do is specify the C
35             metaclass trait.
36              
37             has 'foo' => (traits => [ 'NoGetopt', ... ], ... );
38              
39             =cut