[Dbix-class] Using DBIx::Class::Schema::Config with dbicdump

Marc Logghe logghe.marc at gmail.com
Fri Sep 30 06:38:07 GMT 2011


>
>
> I am using dbicdump to create and update my DBIC schema from the
> database schema. It creates a Schema.pm with the following line in it:
>
> use base 'DBIx::Class::Schema';
>
> ...which I have to change to:
>
> use base 'DBIx::Class::Schema::Config';
>
> ...to use this module.
>
> Unfortunately this line happens to be in the "DO NOT MODIFY THE
> FIRST PART OF THIS FILE" section of Schema.pm. Thus if I modify it,
> I need to change it back to the original every time I want to update
> the DBIC schema to reflect changes in the database. Otherwise
> dbicdump just aborts and refuses to implement any changes.
>
> Does anyone have good suggestions how to avoid this problem?
>
>
I believe you can safely add that line below that section. If not you should
consider wrapping the require in a BEGIN block yourself as explained in the
base pragma.
Disadvantage is of course that it does not strike the eye like when on top.
HTH,
Marc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20110930/31d=
fe194/attachment.htm


More information about the DBIx-Class mailing list