Step up the error reporting on unexpected NULLs during collapse
authorPeter Rabbitson <ribasushi@cpan.org>
Fri, 25 Mar 2016 13:28:42 +0000 (14:28 +0100)
committerPeter Rabbitson <ribasushi@cpan.org>
Wed, 30 Mar 2016 10:54:03 +0000 (12:54 +0200)
commitb3a400a044a5e4a768e26d450e3cce289481ee7a
tree6a8b7c5ca7f4fca48aed6f5094f453e60d471627
parent5ff6d6034ddcb696d24c4b716b5c12f109004d1f
Step up the error reporting on unexpected NULLs during collapse

The collapser became so complex that it is practically impossible to debug
when things go sideways. Expand the rudimentary "just check root identifier"
to a comprehensive check of all identifier groups, at the expense of some
performance. This builds on top of the {nullchecks} metadata collected in
5ff6d603, generating maximally unrolled definedness checks which cause an
early return with no results and flagged unexpected-null-positions

The commit itself is relatively straightforward, though the meager changeset
in lib/ is misleading: the damned thing took almost 8 days to fully think
through and implement with several detours for bugfixing :/
Changes
lib/DBIx/Class/ResultSet.pm
lib/DBIx/Class/ResultSource/RowParser.pm
lib/DBIx/Class/ResultSource/RowParser/Util.pm
t/resultset/misled_rowparser.t [new file with mode: 0644]
t/resultset/rowparser_internals.t