[Catalyst] Bump Catalyst::Model::Adaptor

2013-12-15 Thread Bill Moseley
I'm a big fan of Catalyst::Model::Adaptor.It helps maintain good separation of concerns and code resue. But, there's an annoying issue where it sends its entire config to the model's constructor instead of just what is in args. Some code will complain when it finds unknown constructor

Re: [Catalyst] Bump Catalyst::Model::Adaptor

2013-12-15 Thread neil.lunn
On 16/12/2013 3:27 AM, Bill Moseley wrote: I'm a big fan of Catalyst::Model::Adaptor.It helps maintain good separation of concerns and code resue. But, there's an annoying issue where it sends its entire config to the model's constructor instead of just what is in args. Some code will

Re: [Catalyst] Bump Catalyst::Model::Adaptor

2013-12-15 Thread Bill Moseley
On Sun, Dec 15, 2013 at 4:49 PM, neil.lunn n...@mylunn.id.au wrote: Isn't this just a case of adding to your model class: Yes, that's good. Thanks. sub mangle_arguments { my ( $self, $args ) = @_; return $args-{args}; } Thus overriding the default with what you want to do

Re: [Catalyst] Bump Catalyst::Model::Adaptor

2013-12-15 Thread neil.lunn
On 16/12/2013 12:53 PM, Bill Moseley wrote: On Sun, Dec 15, 2013 at 4:49 PM, neil.lunn n...@mylunn.id.au mailto:n...@mylunn.id.au wrote: Isn't this just a case of adding to your model class: Yes, that's good. Thanks. sub mangle_arguments { my ( $self, $args ) = @_;

Re: [Catalyst] Bump Catalyst::Model::Adaptor

2013-12-15 Thread Bill Moseley
On Sun, Dec 15, 2013 at 6:09 PM, neil.lunn n...@mylunn.id.au wrote: But I prefer the mangle_arguments particulary for classes that do not use a Moose like contructor. The change from the old code seems to be deliberate in passing in extra arguments to the model constructor, so it seems best