Skip to content

Commit

Permalink
spaceship operator should be cmp for strings
Browse files Browse the repository at this point in the history
  • Loading branch information
gbicann committed Nov 30, 2023
1 parent 4764fa0 commit 8b3f688
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/perl/ICANN/RST/Case.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@ sub title {
sub inputs {
my $self = shift;

return sort { $a->id <=> $b->id } map { $self->spec->input($_) } @{$self->{'Input-Parameters'}};
return sort { $a->id cmp $b->id } map { $self->spec->input($_) } @{$self->{'Input-Parameters'}};
}

sub resources {
my $self = shift;

return sort { $a->id <=> $b->id } map { $self->spec->resource($_) } @{$self->{'Resources'}};
return sort { $a->id cmp $b->id } map { $self->spec->resource($_) } @{$self->{'Resources'}};
}

sub errors {
my $self = shift;

return sort { $a->id <=> $b->id } map { $self->spec->error($_) } @{$self->{'Errors'}};
return sort { $a->id cmp $b->id } map { $self->spec->error($_) } @{$self->{'Errors'}};
}

sub dependencies {
my $self = shift;

return sort { $a->id <=> $b->id } map { $self->spec->case($_) } @{$self->{'Dependencies'}};
return sort { $a->id cmp $b->id } map { $self->spec->case($_) } @{$self->{'Dependencies'}};
}

sub dependants {
Expand All @@ -51,7 +51,7 @@ sub dependants {
push(@cases, $case) if (any { $_ eq $self->id } $case->dependencies);
}

return sort { $a->id <=> $b->id } @cases;
return sort { $a->id cmp $b->id } @cases;
}

sub suites {
Expand Down

0 comments on commit 8b3f688

Please sign in to comment.