Centralize all user-side rsrc calls to go through result_source()
This ensures the user will always get a sensible exception when the rsrc
metadata object has not yet been initialized (as introduced in
5298bbb5):
Before:
~$ perl -e 'use base "DBIx::Class::Core"; __PACKAGE__->add_column("foo")'
Can't locate object method "result_source_instance" via package "main" at .../ResultSourceProxy.pm line 29.
After:
~$ perl -e 'use base "DBIx::Class::Core"; __PACKAGE__->add_column("foo")'
DBIx::Class::Row::result_source(): No ResultSource instance registered for 'main', did you forget to call main->table(...) ? at -e line 1
Add a shitload of assertions to track we are doing the right thing in all
cases. This more or less concludes the rsrc changeset necessary to resolve
all ambiguities. The next commit adds user-visible warnings when things go
off the rails
The changeset was successfully tested against the list of distributions
in
c8b1011e with no ill effects being observed. Thus I am pretty damn
confident I rather nailed it >.>