X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FRole%2FMethod%2FConflicting.pm;h=6c077a0a119a2aea6b034525db0da3b65143df9a;hb=ae7820b1b884344a7ee90d94b484ca46459eb7b1;hp=3208b4d7aa04a42551752de0293bf05c0f970e64;hpb=3ee7b5ad664d6b70cb48914bda65cc5c9b905baa;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Role/Method/Conflicting.pm b/lib/Moose/Meta/Role/Method/Conflicting.pm index 3208b4d..6c077a0 100644 --- a/lib/Moose/Meta/Role/Method/Conflicting.pm +++ b/lib/Moose/Meta/Role/Method/Conflicting.pm @@ -4,9 +4,11 @@ package Moose::Meta::Role::Method::Conflicting; use strict; use warnings; +use Moose::Util; + use base qw(Moose::Meta::Role::Method::Required); -our $VERSION = '0.80'; +our $VERSION = '1.06'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; @@ -15,6 +17,11 @@ __PACKAGE__->meta->add_attribute('roles' => ( required => 1, )); +sub roles_as_english_list { + my $self = shift; + Moose::Util::english_list( map { q{'} . $_ . q{'} } @{ $self->roles } ); +} + 1; __END__ @@ -61,13 +68,15 @@ 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->roles_as_english_list >> + +Returns the roles that generated this conflicting method as an English list. + =back =head1 BUGS -All complex software has bugs lurking in it, and this module is no -exception. If you find a bug please either email me, or add the bug -to cpan-RT. +See L for details on reporting bugs. =head1 AUTHOR @@ -75,7 +84,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006-2009 by Infinity Interactive, Inc. +Copyright 2006-2010 by Infinity Interactive, Inc. L