From 455b7a9bb9dbb5d7324fef0db001b29b3bbecb38 Mon Sep 17 00:00:00 2001 From: Henry Van Styn Date: Wed, 29 Oct 2014 09:25:33 -0400 Subject: [PATCH 1/3] Add _merge_joinpref_attr test w/ {}/undef (empty) vals Added a test for the case of join attrs specified with empty ({} or undef) vals (i.e. join => { rel => { rel2 => {} } }). These tests pass, however, the empty {} vals currently produce uninitialized warnings. For further reference, these warnings were bypassed for RapidApp in this commit: https://github.com/vanstyn/RapidApp/commit/6f41f6e48 This test was added per the request of @ribasushi --- t/91merge_joinpref_attr.t | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/t/91merge_joinpref_attr.t b/t/91merge_joinpref_attr.t index 0e9f601ca..a7f9b971f 100644 --- a/t/91merge_joinpref_attr.t +++ b/t/91merge_joinpref_attr.t @@ -6,7 +6,7 @@ use lib qw(t/lib); use DBICTest; use Test::More; -plan tests => 15; +plan tests => 17; my $schema = DBICTest->init_schema(); my $rs = $schema->resultset( 'CD' ); @@ -131,5 +131,20 @@ my $rs = $schema->resultset( 'CD' ); is_deeply( $result, $expected ); } +{ + my $a = [ { 'artist' => { 'manager' => {} } }, 'cd' ]; + my $b = [ 'artist', { 'artist' => { 'manager' => {} } } ]; + my $expected = [ { 'artist' => { 'manager' => {} } }, 'cd', { 'artist' => { 'manager' => {} } } ]; + my $result = $rs->_merge_joinpref_attr($a, $b); + is_deeply( $result, $expected ); +} + +{ + my $a = [ { 'artist' => { 'manager' => undef } }, 'cd' ]; + my $b = [ 'artist', { 'artist' => { 'manager' => undef } } ]; + my $expected = [ { 'artist' => { 'manager' => undef } }, 'cd', { 'artist' => { 'manager' => undef } } ]; + my $result = $rs->_merge_joinpref_attr($a, $b); + is_deeply( $result, $expected ); +} 1; From e401ede7d1652215aa637d118550f252007dcbc0 Mon Sep 17 00:00:00 2001 From: Henry Van Styn Date: Wed, 29 Oct 2014 09:47:21 -0400 Subject: [PATCH 2/3] Add myself to AUTHORS (to make xt/authors.t happy) --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 180d48543..61664fa01 100644 --- a/AUTHORS +++ b/AUTHORS @@ -199,6 +199,7 @@ triode: Pete Gamache typester: Daisuke Murase uree: Oriol Soriano uwe: Uwe Voelker +vanstyn: Henry Van Styn victori: Victor Igumnov wdh: Will Hawes wesm: Wes Malone From 1afdb179d80ac397300f2af0147b4334eed9ce7a Mon Sep 17 00:00:00 2001 From: Henry Van Styn Date: Wed, 29 Oct 2014 10:39:42 -0400 Subject: [PATCH 3/3] Add entry for my commit e-mail to .mailmap --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index 22615b331..ee01f0a68 100644 --- a/.mailmap +++ b/.mailmap @@ -29,6 +29,7 @@ Gerda Shank Gianni Ceccarelli Gordon Irving Hakim Cassimally +Henry Van Styn Jason M. Mills Jonathan Chu Jose Luis Martinez