| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use strict; |
|
3
|
4
|
|
|
4
|
|
24
|
use warnings; |
|
|
4
|
|
|
|
|
6
|
|
|
|
4
|
|
|
|
|
97
|
|
|
4
|
4
|
|
|
4
|
|
16
|
|
|
|
4
|
|
|
|
|
5
|
|
|
|
4
|
|
|
|
|
160
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.48'; |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use Carp qw( confess ); |
|
8
|
4
|
|
|
4
|
|
22
|
use List::Util (); |
|
|
4
|
|
|
|
|
7
|
|
|
|
4
|
|
|
|
|
159
|
|
|
9
|
4
|
|
|
4
|
|
20
|
use Specio::Library::Builtins; |
|
|
4
|
|
|
|
|
6
|
|
|
|
4
|
|
|
|
|
81
|
|
|
10
|
4
|
|
|
4
|
|
20
|
use Specio::TypeChecks qw( does_role ); |
|
|
4
|
|
|
|
|
7
|
|
|
|
4
|
|
|
|
|
21
|
|
|
11
|
4
|
|
|
4
|
|
19
|
|
|
|
4
|
|
|
|
|
8
|
|
|
|
4
|
|
|
|
|
1247
|
|
|
12
|
|
|
|
|
|
|
my $hashref = t('HashRef'); |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
4
|
|
|
4
|
0
|
18
|
## no critic (Subroutines::ProhibitUnusedPrivateSubroutines) |
|
16
|
|
|
|
|
|
|
$hashref->inline_check( $_[1] ); |
|
17
|
|
|
|
|
|
|
} |
|
18
|
|
|
|
|
|
|
|
|
19
|
1
|
|
|
1
|
|
6
|
shift; |
|
20
|
|
|
|
|
|
|
my $args = shift; |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
for my $k (qw( key value )) { |
|
23
|
2
|
|
|
2
|
|
32
|
does_role( |
|
24
|
2
|
|
|
|
|
4
|
$args->{$k}, |
|
25
|
|
|
|
|
|
|
'Specio::Constraint::Role::Interface' |
|
26
|
2
|
|
|
|
|
4
|
) |
|
27
|
|
|
|
|
|
|
or confess |
|
28
|
4
|
50
|
|
|
|
18
|
qq{The "$k" parameter passed to ->parameterize must be one or more objects which do the Specio::Constraint::Role::Interface role}; |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
confess |
|
31
|
|
|
|
|
|
|
qq{The "$k" parameter passed to ->parameterize must be an inlinable constraint} |
|
32
|
|
|
|
|
|
|
unless $args->{$k}->can_be_inlined; |
|
33
|
|
|
|
|
|
|
} |
|
34
|
|
|
|
|
|
|
return map { $_ => $args->{$_} } qw( key value ); |
|
35
|
|
|
|
|
|
|
} |
|
36
|
4
|
50
|
|
|
|
49
|
|
|
37
|
|
|
|
|
|
|
my $self = shift; |
|
38
|
2
|
|
|
|
|
13
|
my $p = shift; |
|
|
4
|
|
|
|
|
12
|
|
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
## no critic (Subroutines::ProtectPrivateSubs) |
|
41
|
|
|
|
|
|
|
return |
|
42
|
2
|
|
|
2
|
|
8
|
'Map{ ' |
|
43
|
2
|
|
|
|
|
4
|
. $self->_name_or_anon( $p->{key} ) . ' => ' |
|
44
|
|
|
|
|
|
|
. $self->_name_or_anon( $p->{value} ) . ' }'; |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
shift; |
|
48
|
|
|
|
|
|
|
my $val = shift; |
|
49
|
2
|
|
|
|
|
6
|
my %args = @_; |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
my $code = <<'EOF'; |
|
52
|
|
|
|
|
|
|
( |
|
53
|
3
|
|
|
3
|
|
4
|
( %s ) |
|
54
|
3
|
|
|
|
|
5
|
&& ( List::Util::all { %s } keys %%{ %s } ) |
|
55
|
3
|
|
|
|
|
7
|
&& ( List::Util::all { %s } values %%{ %s } ) |
|
56
|
|
|
|
|
|
|
) |
|
57
|
3
|
|
|
|
|
5
|
EOF |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
return sprintf( |
|
60
|
|
|
|
|
|
|
$code, |
|
61
|
|
|
|
|
|
|
$hashref->_inline_check($val), |
|
62
|
|
|
|
|
|
|
$args{key}->inline_check('$_'), |
|
63
|
|
|
|
|
|
|
$val, |
|
64
|
|
|
|
|
|
|
$args{value}->inline_check('$_'), |
|
65
|
|
|
|
|
|
|
$val, |
|
66
|
|
|
|
|
|
|
); |
|
67
|
|
|
|
|
|
|
} |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1; |
|
70
|
3
|
|
|
|
|
9
|
|
|
71
|
|
|
|
|
|
|
# ABSTRACT: Guts of Map structured type |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=pod |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=encoding UTF-8 |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 NAME |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Specio::Library::Structured::Map - Guts of Map structured type |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 VERSION |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
version 0.48 |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
There are no user facing parts here. |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=for Pod::Coverage .* |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 SUPPORT |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Bugs may be submitted at L<https://github.com/houseabsolute/Specio/issues>. |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 SOURCE |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
The source code repository for Specio can be found at L<https://github.com/houseabsolute/Specio>. |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 AUTHOR |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
This software is Copyright (c) 2012 - 2022 by Dave Rolsky. |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
This is free software, licensed under: |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
The full text of the license can be found in the |
|
113
|
|
|
|
|
|
|
F<LICENSE> file included with this distribution. |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=cut |