Evo/Class/Attrs/XS.pm untested

filter: Statementstmt 0.0% 0 / 13 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 21 SCAR 6.9
CC
1
Cov
0%
new
2.0
gen_attr
2.0
BEGIN
2.0
CRAP 2.0
1 package Evo::Class::Attrs::XS;
2 use Evo 'XSLoader; -Export';
3  
4 use constant {ECA_OPTIONAL => 0, ECA_DEFAULT => 1, ECA_DEFAULT_CODE => 2, ECA_REQUIRED => 3,
5 ECA_LAZY => 4,};
6  
7 export qw(
8 ECA_OPTIONAL ECA_DEFAULT ECA_DEFAULT_CODE ECA_REQUIRED ECA_LAZY
9 );
10  
11 our $VERSION = '0.0403'; # VERSION
12  
13 # to be able to run with and without dzil
14 my $version = eval '$VERSION'; ## no critic
15 $version
16 ? XSLoader::load("Evo::Class::Attrs::XS", $version)
17 : XSLoader::load("Evo::Class::Attrs::XS");
18  
19 sub new { bless [], shift }
20  
21 sub gen_attr ($self, %opts) {
22 $self->_gen_attr(@opts{qw(name type value check ro inject method)});
23 }
24  
25 1;
26  
27 # ABSTRACT: XS implementation of attributes and "new" method generator
28  
29 __END__