MyApp::RealModel). This way you can conveniently use the code in batch jobs and command line tools outside of the web environment. But still you need to create a nearly empty
MyApp::Model::EmptyModelclass just to connect the outside model into the catalyst framework. This might not seem as too much work - but it requires one more unique name and complicates the documentation. And since this
EmptyModeldoes not introduce much new functionality over the
MyApp::RealModel, the programmer easily forgets about all differences between them - and eventually falls into confusion.
This is one indirection layer too much in my opinion - what I would like instead is to be able to specify in the configuration file (myapp.yml) something like:
Is that change feasible? Don't ask me.