in reply to Truly randomized keys() in perl 5.17 - a challenge for testing?

Sort the keys in tests, or use tied hashes that preserve key order. Or test a round-trip (i.e. use your module to convert Perl data structure -> serialized -> Perl data structure, and use is_deeply to compare the input and output data structures).

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
  • Comment on Re: Truly randomized keys() in perl 5.17 - a challenge for testing?
  • Download Code