Moose::Meta::Role::Method::Conflicting - A Moose metaclass for conflicting methods in Roles


Moose documentation Contained in the Moose distribution.

Index


Code Index:

NAME

Top

Moose::Meta::Role::Method::Conflicting - A Moose metaclass for conflicting methods in Roles

VERSION

Top

version 2.0010

DESCRIPTION

Top

INHERITANCE

Top

Moose::Meta::Role::Method::Conflicting is a subclass of Moose::Meta::Role::Method::Required.

METHODS

Top

Moose::Meta::Role::Method::Conflicting->new(%options)

This creates a new type constraint based on the provided %options:

* name

The method name. This is required.

* roles

The list of role names that generated the conflict. This is required.

$method->name

Returns the conflicting method's name, as provided to the constructor.

$method->roles

Returns the roles that generated this conflicting method, as provided to the constructor.

$method->roles_as_english_list

Returns the roles that generated this conflicting method as an English list.

BUGS

Top

See BUGS in Moose for details on reporting bugs.

AUTHOR

Top

Stevan Little <stevan@iinteractive.com>

COPYRIGHT AND LICENSE

Top


Moose documentation Contained in the Moose distribution.

package Moose::Meta::Role::Method::Conflicting;
BEGIN {
  $Moose::Meta::Role::Method::Conflicting::AUTHORITY = 'cpan:STEVAN';
}
BEGIN {
  $Moose::Meta::Role::Method::Conflicting::VERSION = '2.0010';
}

use strict;
use warnings;

use Moose::Util;

use base qw(Moose::Meta::Role::Method::Required);

__PACKAGE__->meta->add_attribute('roles' => (
    reader   => 'roles',
    required => 1,
));

sub roles_as_english_list {
    my $self = shift;
    Moose::Util::english_list( map { q{'} . $_ . q{'} } @{ $self->roles } );
}

1;

# ABSTRACT: A Moose metaclass for conflicting methods in Roles




__END__