I ran into a problem where the code on my machine didn't work, but it did on our staging servers.
I eventually dug down to work out that we used a different version of your plugin.
This means that if you call resultset before schema (like you might when writing tests), the config is not loaded.
This breaks backwards compatibility from v2102 (current) to v2100.
I ran into a problem where the code on my machine didn't work, but it did on our staging servers. I eventually dug down to work out that we used a different version of your plugin.
When you moved the chunk of code to DBICx::Sugar, in this plugin you then call DBICx::Sugar's version of schema as opposed to the plugins version of schema. See https://github.com/ironcamel/Dancer-Plugin-DBIC/blob/master/lib/Dancer/Plugin/DBIC.pm#L20
This means that if you call resultset before schema (like you might when writing tests), the config is not loaded. This breaks backwards compatibility from v2102 (current) to v2100.
I'll happily submit a pull request for this.