On 10/01/2014 3:55 PM, Peter Rabbitson wrote:
On Fri, Jan 10, 2014 at 03:08:54PM +1100, neil.lunn wrote:
Just to clarify. Is the objective here to 'flatten out' a single
element array for any key with a "-" prefix only or is it wanted
that anything that is a single element arrayref no longer being an
arrayref, but just what it contains.
I have to admit you lost me... Can you give an example of
"left/right/result" the way *you* understand it, then it will be trivial
to answer your question.
Current test cases are showing an expected result of :
[{ artist => { '-foo' => 1 }}]
and getting a result of:
[{ artist => [ { '-foo' => [ 1 ] } ]}]

and so on.

This implies reducing any lists that only have one element to simply being that element.
Also, given that case this seems unclear (at line 284) Expected:
[{ artist => { '-xyzzy' => undef, tour_manager => [ 'venue', 'roadie' ]} }, 'cd']
and result:
[{ artist => [{ '-xyzzy' => undef }, { tour_manager => [ 'venue', 'roadie' ] } ]}, 'cd' ]

Which is flattening the list in 'artist' to a hashref.
I know that the merging hashref is not a list but is presently being munged into one so was really just looking for a clarification of the behavior expected of keys with a "-" prefix. And the assuming that other merges are just expected to return as is. In the case of above, not munge into a list when it was not provided as such.

Also not sure the coding on test failing at 252 is right in the expected result.

-- Neil

Cheers


_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk


---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com


_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to