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
|
|
10313
|
use Mouse::Role; |
|
22
|
|
|
|
|
53
|
|
|
22
|
|
|
|
|
188
|
|
5
|
22
|
|
|
22
|
|
6499
|
no Mouse::Role; |
|
22
|
|
|
|
|
62
|
|
|
22
|
|
|
|
|
85
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# register this as a metaclass alias ... |
8
|
|
|
|
|
|
|
package # stop confusing PAUSE |
9
|
|
|
|
|
|
|
Mouse::Meta::Attribute::Custom::Trait::NoGetopt; |
10
|
20
|
|
|
20
|
|
17264
|
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 |