line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Evo::Class::Attrs::XS; |
2
|
41
|
|
|
41
|
|
309
|
use Evo 'XSLoader; -Export'; |
|
41
|
|
|
|
|
88
|
|
|
41
|
|
|
|
|
299
|
|
3
|
|
|
|
|
|
|
|
4
|
41
|
|
|
|
|
10468
|
use constant {ECA_OPTIONAL => 0, ECA_DEFAULT => 1, ECA_DEFAULT_CODE => 2, ECA_REQUIRED => 3, |
5
|
41
|
|
|
41
|
|
286
|
ECA_LAZY => 4,}; |
|
41
|
|
|
|
|
82
|
|
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
|
211
|
|
|
211
|
0
|
7677
|
sub new { bless [], shift } |
20
|
|
|
|
|
|
|
|
21
|
507
|
50
|
|
507
|
0
|
1561
|
sub gen_attr ($self, %opts) { |
|
507
|
50
|
|
|
|
4227
|
|
|
507
|
|
|
|
|
790
|
|
|
507
|
|
|
|
|
2146
|
|
|
507
|
|
|
|
|
1231
|
|
22
|
507
|
|
|
|
|
4288
|
$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__ |