From: Yuval Kogman Date: Sun, 30 Apr 2006 18:28:07 +0000 (+0000) Subject: Allow per-case overriding of default filter X-Git-Tag: 0_09_03~49 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8d82cda075db89d040002bd23247d86ff11d501c;p=gitmo%2FMoose.git Allow per-case overriding of default filter --- diff --git a/lib/Moose/Meta/Class.pm b/lib/Moose/Meta/Class.pm index 7858736..70ea64a 100644 --- a/lib/Moose/Meta/Class.pm +++ b/lib/Moose/Meta/Class.pm @@ -103,10 +103,12 @@ sub filter_delegations { grep { my $new_name = $_->{new_name} || $_->{name}; no warnings "uninitialized"; - !$self->name->can( $new_name ) and - $attr->accessor ne $new_name and - $attr->reader ne $new_name and - $attr->writer ne $new_name + $_->{no_filter} or ( + !$self->name->can( $new_name ) and + $attr->accessor ne $new_name and + $attr->reader ne $new_name and + $attr->writer ne $new_name + ); } @delegations; }