blib/lib/Acme/HashKeyOrderBrokenAgain.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 95.2% 20 / 21 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
↑ Summary
1 ###########################################
2 package Acme::HashKeyOrderBrokenAgain;
3 ###########################################
4  
5 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use Test::More;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 our $VERSION = "0.02";
10  
11 1 ▶sub hash_key_order_reproducable {
Subroutine hash_key_order_reproducable: called CC=1 SCAR=0.0
Pod undocumented
12 1 local $ENV{ PERL_PERTURB_KEYS } = "DETERMINISTIC";
13  
14 1 my %hash = ( one => 1, two => 2, three => 3,
15 four => 4, five => 5, six => 6,
16 seven => 7, eight => 8, nine => 9,
17 ten => 10 );
18  
19 1 my @first = keys %hash;
20 1 my @second = keys %hash;
21  
22 1 return is_deeply
23 \@first, \@second, "compare hash key order for subsequent calls " .
24 "with PERL_PERTURB_KEYS=$ENV{ PERL_PERTURB_KEYS }";
25 }
26  
27 2 1;
28  
29 __END__
↑ Summary