File Coverage

blib/lib/MouseX/Getopt/Meta/Attribute/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::NoGetopt;
2             # ABSTRACT: Optional meta attribute for ignoring params
3              
4 22     22   79 use Mouse;
  22         22  
  22         94  
5              
6             extends 'Mouse::Meta::Attribute'; # << Mouse extending Mouse :)
7             with 'MouseX::Getopt::Meta::Attribute::Trait::NoGetopt';
8              
9 22     22   4990 no Mouse;
  22         26  
  22         65  
10              
11             # register this as a metaclass alias ...
12             package # stop confusing PAUSE
13             Mouse::Meta::Attribute::Custom::NoGetopt;
14 21     21   10953 sub register_implementation { 'MouseX::Getopt::Meta::Attribute::NoGetopt' }
15              
16             1;
17              
18             =for stopwords metaclass commandline
19              
20             =head1 SYNOPSIS
21              
22             package App;
23             use Mouse;
24              
25             with 'MouseX::Getopt';
26              
27             has 'data' => (
28             metaclass => 'NoGetopt', # do not attempt to capture this param
29             is => 'ro',
30             isa => 'Str',
31             default => 'file.dat',
32             );
33              
34             =head1 DESCRIPTION
35              
36             This is a custom attribute metaclass which can be used to specify
37             that a specific attribute should B be processed by
38             C. All you need to do is specify the C
39             metaclass.
40              
41             has 'foo' => (metaclass => 'NoGetopt', ... );
42              
43             =cut