line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
665
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
2
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
62
|
|
3
|
|
|
|
|
|
|
package Data::Rx::CommonType::EasyNew; |
4
|
|
|
|
|
|
|
# ABSTRACT: base class for core Rx types, with some defaults |
5
|
|
|
|
|
|
|
$Data::Rx::CommonType::EasyNew::VERSION = '0.200006'; |
6
|
1
|
|
|
1
|
|
6
|
use parent 'Data::Rx::CommonType'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
9
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
40
|
use Carp (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
153
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub guts_from_arg { |
11
|
18
|
|
|
18
|
0
|
52
|
my ($class, $arg, $rx, $type) = @_; |
12
|
|
|
|
|
|
|
|
13
|
18
|
50
|
|
|
|
55
|
Carp::croak "$class does not take check arguments" if %$arg; |
14
|
|
|
|
|
|
|
|
15
|
18
|
|
|
|
|
42
|
return {}; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new_checker { |
19
|
115
|
|
|
115
|
0
|
230
|
my ($class, $arg, $rx, $type) = @_; |
20
|
|
|
|
|
|
|
|
21
|
115
|
|
|
|
|
735
|
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
|
|
|
|
|
299
|
$guts->{_type} = $type; |
25
|
101
|
|
|
|
|
309
|
$guts->{_rx} = $rx; |
26
|
|
|
|
|
|
|
|
27
|
101
|
|
|
|
|
554
|
bless $guts => $class; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
1758
|
|
|
1758
|
0
|
11342
|
sub type { $_[0]->{_type} } |
31
|
|
|
|
|
|
|
|
32
|
3257
|
|
|
3257
|
0
|
23184
|
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__ |