[Catalyst] Bump Catalyst::Model::Adaptor

neil.lunn neil at mylunn.id.au
Mon Dec 16 00:49:03 GMT 2013


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 complain when it finds unknown constructor arguments. =

>  For example I'm seeing lots of these:
>
> Unrecognised options: args catalyst_component_name class at =

> /var/lib/jenkins/perl5/perlbrew/perls/jenkins/lib/site_perl/5.14.4/Cataly=
st/Model/Adaptor/Base.pm =

> line 27.
Hi Bill,

Isn't this just a case of adding to your model class:

sub mangle_arguments {
     my ( $self, $args ) =3D @_;
     return $args->{args};
}

Thus overriding the default with what you want to do for your constructor.
This clears the error for me.

>
> In this case it is Cache::Memcached::libmemcached complaining.
>
> I think there's a suggested patch in one of these.   Is there someone =

> that can review and maybe push out a new version?
>
> https://rt.cpan.org/Public/Bug/Display.html?id=3D67078
> https://rt.cpan.org/Public/Bug/Display.html?id=3D78663
>
>
>
> -- =

> Bill Moseley
> moseley at hank.org <mailto:moseley at hank.org>
>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.u=
k/
> Dev site: http://dev.catalyst.perl.org/



---
This email is free from viruses and malware because avast! Antivirus protec=
tion is active.
http://www.avast.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20131216/b2421=
b96/attachment.htm


More information about the Catalyst mailing list