Fix and guard against erroneous use of list context in internal DBIC code
authorPeter Rabbitson <ribasushi@cpan.org>
Sat, 5 Oct 2013 08:14:38 +0000 (10:14 +0200)
committerPeter Rabbitson <ribasushi@cpan.org>
Tue, 8 Oct 2013 12:25:03 +0000 (14:25 +0200)
commita9da9b6a57a597bc7e52c7e7ad7221eaa7ee6d14
treed80a8976ca19019fc56e134cfe917695147e525c
parent1439bf153439341cdba3ed1e53141ed5a0575705
Fix and guard against erroneous use of list context in internal DBIC code

This situation is dangerous in case the end-user employs something like
DBIx::Class::Helper::ResultSet::IgnoreWantarray

Besides the trivial fix in ::Row::copy, this commit introduces the
DBIC_ASSERT_NO_INTERNAL_WANTARRAY=1 mechanism (which will be
automatically picked up and engaged by our CI due to eed5492f). As a
bonus the check is usable on DBIC dependencies as well.
Changes
lib/DBIx/Class.pm
lib/DBIx/Class/Relationship/Accessor.pm
lib/DBIx/Class/Relationship/ManyToMany.pm
lib/DBIx/Class/ResultSet.pm
lib/DBIx/Class/ResultSetColumn.pm
lib/DBIx/Class/Row.pm
lib/DBIx/Class/_Util.pm