Aloha!
I have a role that I am defining in a Moose class called Authable, which essentially consists of any class that could potentially require some form of authentication in the future; this is a fairly simple role, here is the completeness:
package Trello::API::Roles::Authable;
use Moose::Role;
has key => (
is => "rw",
isa => "Str",
);
has token => (
is => "rw",
isa => "Str",
);
1;
For some reason, when I try to compose it into a class using several different operators, i.e. with "Trello :: API :: Roles :: Authable"; or with "Roles :: Authable";
I get the following error message: You can only consume roles, Roles::Authable is not a Moose role.
Any idea why this could be happening?
Edit
Just a side note, I checked the actual source for Moose :: Role and saw this bit:
unless ($meta && $meta->isa('Moose::Meta::Role') ) {
require Moose;
Moose->throw_error( "You can only consume roles, "
. $role->[0]
. " is not a Moose role" );
}
, , , - , , , . ! .
EDIT!
: , .
package Trello::API::Resource;
use Moose;
use URI::Escape;
use LWP::UserAgent;
with 'Roles::Authable';
, , , /Authable.pm, - !