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/Catalyst/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 ) = @_;
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=67078
https://rt.cpan.org/Public/Bug/Display.html?id=78663
--
Bill Moseley
[email protected] <mailto:[email protected]>
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/
---
This email is free from viruses and malware because avast! Antivirus protection
is active.
http://www.avast.com
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/