line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Combine::Keys; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
153204
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
79
|
|
4
|
3
|
|
|
3
|
|
13
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
82
|
|
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
16
|
use base 'Import::Export'; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
800
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.09'; |
9
|
|
|
|
|
|
|
require XSLoader; |
10
|
|
|
|
|
|
|
XSLoader::load('Combine::Keys', $VERSION); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our %EX= ( |
13
|
|
|
|
|
|
|
ckeys => [qw/all xs/], |
14
|
|
|
|
|
|
|
combine_keys => [qw/all perl/], |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub combine_keys { |
18
|
4
|
|
|
4
|
1
|
4571
|
return @{ ckeys([@_]) }; |
|
4
|
|
|
|
|
52
|
|
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 NAME |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Combine::Keys - keys on multiple hash references |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 VERSION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Version 0.09 |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=cut |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 SYNOPSIS |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Quick summary of what the module does. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
use Combine::Keys qw/combine_keys/; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
for ( combine_keys($hash1, \%hash2, { e => 'f' }) ) { |
38
|
|
|
|
|
|
|
.... magic --- |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 EXPORT |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head2 combine_keys |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Takes an Array of hash references and returns an array of keys. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head2 ckeys |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Takes an Array reference of hashes and returns an array reference of keys. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=cut |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 AUTHOR |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Robert Acock, C<< >> |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 BUGS |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through |
62
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
63
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 SUPPORT |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
perldoc Combine::Keys |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
You can also look for information at: |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=over 4 |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker (report bugs here) |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
L |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
L |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=item * CPAN Ratings |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
L |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=item * Search CPAN |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
L |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=back |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Copyright 2017 Robert Acock. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
100
|
|
|
|
|
|
|
under the terms of the the Artistic License (2.0). You may obtain a |
101
|
|
|
|
|
|
|
copy of the full license at: |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
L |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Any use, modification, and distribution of the Standard or Modified |
106
|
|
|
|
|
|
|
Versions is governed by this Artistic License. By using, modifying or |
107
|
|
|
|
|
|
|
distributing the Package, you accept this license. Do not use, modify, |
108
|
|
|
|
|
|
|
or distribute the Package, if you do not accept this license. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
If your Modified Version has been derived from a Modified Version made |
111
|
|
|
|
|
|
|
by someone other than you, you are nevertheless required to ensure that |
112
|
|
|
|
|
|
|
your Modified Version complies with the requirements of this license. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
This license does not grant you the right to use any trademark, service |
115
|
|
|
|
|
|
|
mark, tradename, or logo of the Copyright Holder. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
This license includes the non-exclusive, worldwide, free-of-charge |
118
|
|
|
|
|
|
|
patent license to make, have made, use, offer to sell, sell, import and |
119
|
|
|
|
|
|
|
otherwise transfer the Package with respect to any patent claims |
120
|
|
|
|
|
|
|
licensable by the Copyright Holder that are necessarily infringed by the |
121
|
|
|
|
|
|
|
Package. If you institute patent litigation (including a cross-claim or |
122
|
|
|
|
|
|
|
counterclaim) against any party alleging that the Package constitutes |
123
|
|
|
|
|
|
|
direct or contributory patent infringement, then this Artistic License |
124
|
|
|
|
|
|
|
to you shall terminate on the date that such litigation is filed. |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER |
127
|
|
|
|
|
|
|
AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. |
128
|
|
|
|
|
|
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR |
129
|
|
|
|
|
|
|
PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY |
130
|
|
|
|
|
|
|
YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR |
131
|
|
|
|
|
|
|
CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR |
132
|
|
|
|
|
|
|
CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, |
133
|
|
|
|
|
|
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=cut |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
1; # End of Combine::Keys |