line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
433
|
use v5.12.0; |
|
1
|
|
|
|
|
4
|
|
2
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
57
|
|
3
|
|
|
|
|
|
|
package Data::Rx::CommonType::EasyNew 0.200008; |
4
|
|
|
|
|
|
|
# ABSTRACT: base class for core Rx types, with some defaults |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
7
|
use parent 'Data::Rx::CommonType'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
45
|
use Carp (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
149
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub guts_from_arg { |
11
|
23
|
|
|
23
|
0
|
76
|
my ($class, $arg, $rx, $type) = @_; |
12
|
|
|
|
|
|
|
|
13
|
23
|
100
|
|
|
|
597
|
Carp::croak "$class does not take check arguments" if %$arg; |
14
|
|
|
|
|
|
|
|
15
|
18
|
|
|
|
|
43
|
return {}; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new_checker { |
19
|
128
|
|
|
128
|
0
|
342
|
my ($class, $arg, $rx, $type) = @_; |
20
|
|
|
|
|
|
|
|
21
|
128
|
|
|
|
|
446
|
my $guts = $class->guts_from_arg($arg, $rx, $type); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# Carp::confess "underscore-led entry in guts!" if grep /\A_/, keys %$guts; |
24
|
101
|
|
|
|
|
235
|
$guts->{_type} = $type; |
25
|
101
|
|
|
|
|
183
|
$guts->{_rx} = $rx; |
26
|
|
|
|
|
|
|
|
27
|
101
|
|
|
|
|
264
|
bless $guts => $class; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
1758
|
|
|
1758
|
0
|
7052
|
sub type { $_[0]->{_type} } |
31
|
|
|
|
|
|
|
|
32
|
3257
|
|
|
3257
|
0
|
10093
|
sub rx { $_[0]->{_rx} } |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
#pod =pod |
35
|
|
|
|
|
|
|
#pod |
36
|
|
|
|
|
|
|
#pod =head1 NOTE |
37
|
|
|
|
|
|
|
#pod |
38
|
|
|
|
|
|
|
#pod For examples on how to subclass this, see L. |
39
|
|
|
|
|
|
|
#pod |
40
|
|
|
|
|
|
|
#pod =cut |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |