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
|
|
7679
|
use Mouse::Role; |
|
22
|
|
|
|
|
30
|
|
|
22
|
|
|
|
|
98
|
|
5
|
22
|
|
|
22
|
|
3732
|
no Mouse::Role; |
|
22
|
|
|
|
|
28
|
|
|
22
|
|
|
|
|
65
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# register this as a metaclass alias ... |
8
|
|
|
|
|
|
|
package # stop confusing PAUSE |
9
|
|
|
|
|
|
|
Mouse::Meta::Attribute::Custom::Trait::NoGetopt; |
10
|
20
|
|
|
20
|
|
10032
|
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 |