blib/lib/MouseX/Getopt/Meta/Attribute/Trait/NoGetopt.pm

filter: Statementstmt 100% 8 / 8 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 11 / 11 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
register_implementation
1.0
CRAP 1.0
« blib/lib/MouseX/Getopt/Meta/Attribute/Trait.pm ↑ Summary blib/lib/MouseX/Getopt/Strict.pm »
1 package MouseX::Getopt::Meta::Attribute::Trait::NoGetopt;
2 # ABSTRACT: Optional meta attribute trait for ignoring params
3  
4 22 ▶use Mouse::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 22 ▶no Mouse::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 # register this as a metaclass alias ...
8 package # stop confusing PAUSE
9 Mouse::Meta::Attribute::Custom::Trait::NoGetopt;
10 20 ▶sub register_implementation { 'MouseX::Getopt::Meta::Attribute::Trait::NoGetopt' }
Subroutine register_implementation: called CC=1 SCAR=0.0
11  
12 22 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<not> be processed by
34 C<MouseX::Getopt>. All you need to do is specify the C<NoGetopt>
35 metaclass trait.
36  
37 has 'foo' => (traits => [ 'NoGetopt', ... ], ... );
38  
39 =cut
« blib/lib/MouseX/Getopt/Meta/Attribute/Trait.pm ↑ Summary blib/lib/MouseX/Getopt/Strict.pm »