[DBIx-Class-Devel] [Perl5/DBIx-Class] Use deep merge for column info when adding columns (#128)

Peter Rabbitson notifications at github.com
Tue Jul 31 04:59:52 GMT 2018


The more important issue here is that it is not clear cut what does *handle the "extra" key* actually mean. Currently if one wants to **rewrite** the `extra` contents, they can do it with a `+foo`. After your patch - they will no longer be able to.

As your patch came without an extensive test case, it is difficult for me to figure out what your use case is. I **suspect** that you simply find the behavior you are proposing a better default, and could do what you want today instead as:
```
__PACKAGE__->add_column(
  '+foo' => { ... extra => {
    %{ __PACKAGE__->column_info("foo")->{extra} || {} }
    < extra stuff above or below this line depending whether you want override or default else >
  } }
);
```

I am in general very disinclined changing established behavioral defaults. Please explain in more detail why this case warrants an exemption.

P.S. I am leaving on a week-long trip: might not read/respond for a while

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/Perl5/DBIx-Class/pull/128#issuecomment-409095082
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20180730/b5206969/attachment.htm>


More information about the DBIx-Class-Devel mailing list