line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Tie::IxHash::Extension; |
2
|
|
|
|
|
|
|
$Tie::IxHash::Extension::VERSION = '0.003'; |
3
|
6
|
|
|
6
|
|
37
|
use strict; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
253
|
|
4
|
6
|
|
|
6
|
|
29
|
use warnings; |
|
6
|
|
|
|
|
7
|
|
|
6
|
|
|
|
|
1691
|
|
5
|
6
|
|
|
6
|
|
6017
|
use List::AllUtils; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
{ |
8
|
|
|
|
|
|
|
package Tie::IxHash; |
9
|
|
|
|
|
|
|
$Tie::IxHash::VERSION = '0.003'; |
10
|
|
|
|
|
|
|
use constant ERROR_KEY_LENGTH_MISMATCH => "incorrect number of keys"; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub RenameKeys { |
13
|
|
|
|
|
|
|
my ($self, @names) = @_; |
14
|
|
|
|
|
|
|
die ERROR_KEY_LENGTH_MISMATCH if @names != $self->Length; |
15
|
|
|
|
|
|
|
my @values = $self->Values; |
16
|
|
|
|
|
|
|
my @new_kv = List::AllUtils::mesh( @names, @values ); |
17
|
|
|
|
|
|
|
$self->Splice(0, $self->Length, @new_kv); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=pod |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=encoding UTF-8 |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 NAME |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Tie::IxHash::Extension |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 VERSION |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
version 0.003 |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 AUTHOR |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Zakariyya Mughal <zmughal@cpan.org> |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
This software is copyright (c) 2014 by Zakariyya Mughal. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
48
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=cut |