Skip to content

Commit a3dcf11

Browse files
bulk88Leont
authored andcommitted
revert "sort keys before iterating over them so we have deterministic behavior between runs"
This partially reverts commit 4d4d3f0. In "Unknown arguments to TAP::Harness::new" croak, sorting was kept, but moved into the branch where it is needed.
1 parent 402d912 commit a3dcf11

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/TAP/Harness.pm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ BEGIN {
8787
trap => sub { shift; shift },
8888
);
8989

90-
for my $method ( sort keys %VALIDATION_FOR ) {
90+
for my $method ( keys %VALIDATION_FOR ) {
9191
no strict 'refs';
9292
if ( $method eq 'lib' || $method eq 'switches' ) {
9393
*{$method} = sub {
@@ -432,7 +432,7 @@ Any keys for which the value is C<undef> will be ignored.
432432
$self->SUPER::_initialize( $arg_for, \@legal_callback );
433433
my %arg_for = %$arg_for; # force a shallow copy
434434

435-
for my $name ( sort keys %VALIDATION_FOR ) {
435+
for my $name ( keys %VALIDATION_FOR ) {
436436
my $property = delete $arg_for{$name};
437437
if ( defined $property ) {
438438
my $validate = $VALIDATION_FOR{$name};
@@ -475,8 +475,8 @@ Any keys for which the value is C<undef> will be ignored.
475475
);
476476
}
477477

478-
if ( my @props = sort keys %arg_for ) {
479-
$self->_croak("Unknown arguments to TAP::Harness::new (@props)");
478+
if ( my @props = keys %arg_for ) {
479+
$self->_croak('Unknown arguments to TAP::Harness::new ('.join(' ',sort @props).')');
480480
}
481481

482482
return $self;

lib/TAP/Parser.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,9 +1340,9 @@ sub _make_state_table {
13401340
my $st = { %state_globals, %{ $states{$name} } };
13411341

13421342
# Add defaults
1343-
for my $next ( sort keys %{$st} ) {
1343+
for my $next ( keys %$st ) {
13441344
if ( my $default = $state_defaults{$next} ) {
1345-
for my $def ( sort keys %{$default} ) {
1345+
for my $def ( keys %$default ) {
13461346
$st->{$next}->{$def} ||= $default->{$def};
13471347
}
13481348
}

0 commit comments

Comments
 (0)