We have hit an interesting thing in our ever changing code base.
We want to start managing the database schema and use the power of DBIx::Class to keep the code and database in sync by auto generation.
However, we also want to keep to coding standards by running Test::Perl::Critic at maximum severity over the code base.
Problem - the auto generated code fails tests, but if we modify above the comment line
#DO NOT MODIFY ANYTHING ABOVE THIS LINE
we lose the ability to run regeneration of the code if we make any database changes.
One solution is to say, don't run Perl::Critic over the resultset files. However, this means we need to separate out any manually written code, which should be here (running Catalyst, etc), or we never Test::Perl::Critic our own code. It also means additional maintenance to our auto test each time we add more files.
Another is never to be able to auto-regenerate and manually keep the database and code in sync.
So, has anyone come across any solutions to this problem? All comments gratefully received.
BTW - we understand that
1) TIMTOADY - some people write good maintainable code which doesn't follow Perl::Critic standards.
2) It would be very difficult for maintainers of code which generates code to constantly keep up with the latest Perl::Critic.