From: Shawn M Moore Date: Sun, 31 May 2009 02:57:10 +0000 (-0400) Subject: Use class/type information instead of a useless is_conflict method X-Git-Tag: 0.80~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=16d7dc8d765cb3a7b7afeba366a9d0d8c1d046d6;p=gitmo%2FMoose.git Use class/type information instead of a useless is_conflict method --- diff --git a/lib/Moose/Meta/Role/Application/ToClass.pm b/lib/Moose/Meta/Role/Application/ToClass.pm index f7573ab..6b25811 100644 --- a/lib/Moose/Meta/Role/Application/ToClass.pm +++ b/lib/Moose/Meta/Role/Application/ToClass.pm @@ -73,7 +73,7 @@ sub check_required_methods { my $error = ''; - my @conflicts = grep { $_->is_conflict } @missing; + my @conflicts = grep { $_->isa('Moose::Meta::Role::Method::Conflicting') } @missing; if (@conflicts) { my $conflict = $conflicts[0]; diff --git a/lib/Moose/Meta/Role/Method/Conflicting.pm b/lib/Moose/Meta/Role/Method/Conflicting.pm index 4957177..bdf3266 100644 --- a/lib/Moose/Meta/Role/Method/Conflicting.pm +++ b/lib/Moose/Meta/Role/Method/Conflicting.pm @@ -15,8 +15,6 @@ __PACKAGE__->meta->add_attribute('roles' => ( required => 1, )); -sub is_conflict { 1 } - 1; __END__ @@ -63,11 +61,6 @@ Returns the conflicting method's name, as provided to the constructor. Returns the roles that generated this conflicting method, as provided to the constructor. -=item B<< $method->is_conflict >> - -Returns whether the method requirement is due to a conflict. By default for -this class, it's true. - =back =head1 BUGS diff --git a/lib/Moose/Meta/Role/Method/Required.pm b/lib/Moose/Meta/Role/Method/Required.pm index 9b56548..977f363 100644 --- a/lib/Moose/Meta/Role/Method/Required.pm +++ b/lib/Moose/Meta/Role/Method/Required.pm @@ -24,8 +24,6 @@ __PACKAGE__->meta->add_attribute('name' => ( sub new { shift->_new(@_) } -sub is_conflict { 0 } - 1; __END__ @@ -64,11 +62,6 @@ The method name. This is required. Returns the required method's name, as provided to the constructor. -=item B<< $method->is_conflict >> - -Returns whether the method requirement is due to a conflict. By default for -this class, it's false. - =back =head1 BUGS