This queue is for tickets about the HTML-TagCloud CPAN distribution.

Report information
The Basics
Id:
81805
Status:
open
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
ANDK [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
0.37
Fixed in:
(no value)

Attachments
0001-Fix-for-the-test-failures-due-to-hash-randomisation-.patch



Subject: Test failures due to hash randomisation in perl 5.17.6
Since bleadperl v5.17.5-518-g7dc8663 your tests are failing frequently. That commit introduced hash key randomization and it seems at least the test t/simple.t is hit by that. Find a sample fail report at: http://www.cpantesters.org/cpan/report/ec21d46e-3220-11e2-89ec-4702cdac6e64 You can read more about the change at http://perl5.git.perl.org/perl.git/commit/7dc8663964c66a698d31bbdc8e8abed69bddeec3 or at http://www.perlmonks.org/?node_id=1005122 You may have to run the test several times until the randomization causes a fail. HTH&&Thanks&&Regards,
I think that the attached patch solve the issue. Em Sab Dez 08 12:02:06 2012, ANDK escreveu:
Show quoted text
> Since bleadperl v5.17.5-518-g7dc8663 your tests are failing > frequently. > That commit introduced hash key randomization and it seems at least > the test > > t/simple.t > > is hit by that. Find a sample fail report at: > > http://www.cpantesters.org/cpan/report/ec21d46e-3220-11e2-89ec- > 4702cdac6e64 > > You can read more about the change at > http://perl5.git.perl.org/perl.git/commit/7dc8663964c66a698d31bbdc8e8abed69bddeec3 > or at http://www.perlmonks.org/?node_id=1005122 > > You may have to run the test several times until the randomization > causes a fail. > > HTH&&Thanks&&Regards,
Subject: 0001-Fix-for-the-test-failures-due-to-hash-randomisation-.patch
From 83713e0c40449560986e856149f7aa036a6bd5b1 Mon Sep 17 00:00:00 2001 From: Bruno Buss <bruno.buss@gmail.com> Date: Fri, 12 Apr 2013 13:28:34 +0100 Subject: [PATCH] Fix for the test failures due to hash randomisation in perl 5.17.6 (RT 81805). The test expected that in case of two tags with same count, the one that came first lexicographic should be returned. Now we guarantee this in the code. --- lib/HTML/TagCloud.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/HTML/TagCloud.pm b/lib/HTML/TagCloud.pm index 76f0b13..55001b2 100644 --- a/lib/HTML/TagCloud.pm +++ b/lib/HTML/TagCloud.pm @@ -72,7 +72,7 @@ sub tags { my $counts = $self->{counts}; my $urls = $self->{urls}; my $category_for = $self->{category_for}; - my @tags = sort { $counts->{$b} <=> $counts->{$a} } keys %$counts; + my @tags = sort { $counts->{$b} <=> $counts->{$a} || $a cmp $b } keys %$counts; @tags = splice( @tags, 0, $limit ) if defined $limit; return unless scalar @tags; -- 1.7.9.5


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.