We are currently introducing DBIx::Class
in our team and we would like to start out with DBIx::Class::Schema::Loader
. However, we have hard requirements on code style, i.e. we've got Perl::Tidy
as part of our pre-commit
script, since we haven't had any generated code before. Now, we'd have to make sure that the code that Schema::Loader
generates is clean and tidy. We can't run perltidy
over the code before commit, since it screws up DBIC's MD5 hashing. So a post-processor integrated into Schema::Loader
would be my preferred and probably the only feasible solution. But still: how would you handle this problem?
EDIT I might as well patch DBIx::Class::Schema::Loader::Base
to use a perltidy
preprocess
parameter if it gets one.
0.05000 has been released (previously the development version) it has the overwrite_modifications option rbuels added.
I will try to add a post_process option as well soon.
The development version of DBICSL now has an overwrite_modifications option you can use to ignore changes in the md5summed parts of the code. This should let you run perltidy on the output before committing it, and still be able to re-dump later.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With