Re: Comparing aggregates for equality when order doesn't matter

2009-12-15 Thread Philip Potter
2009/12/15 Shawn H Corey : > Philip Potter wrote: >> 1. Is there a "set" type which holds aggregate data and doesn't care >> about order, which I could use to compare these results for equality? > > You can use a hash as a set or a bag. Yeah I thought about this -- while I can see how it works wit

Re: Comparing aggregates for equality when order doesn't matter

2009-12-15 Thread Shawn H Corey
Philip Potter wrote: > 1. Is there a "set" type which holds aggregate data and doesn't care > about order, which I could use to compare these results for equality? You can use a hash as a set or a bag. #!/usr/bin/perl use strict; use warnings; use Data::Dumper; # Make Data::Dumper pretty $Data

Comparing aggregates for equality when order doesn't matter

2009-12-15 Thread Philip Potter
Hi all, I have a method which returns two arrayrefs: one is an array of hashes, and the other an array of arrays. I'm writing a test harness for this method, so I put together some testcases and expected results. I don't care what order the arrays are in; I only care that the arrayrefs returned by