Several times, I’ve wished I could write command-line tools to manage Catalyst applications. Those tools, invariably, needed to call some of the Catalyst functions, or at least get to the database.
I had struggled with Config::JFDI and tried to create DBIx::Class objects outside of the Catalyst models so they could be used standalone. This sort of worked, but wasn’t as easy as I wanted.
I found a way, and it’s so simple it hurts. I can’t help think this is one of those things the Catalyst team will read and think, “Well, duh!” but it was never clear to me and I struggled with it for months. (more…)