Roles "consumption" and constant pragma

[email protected] (Marcos Barbeitos)
Newsgroups perl.moose
Message-ID <CA+gEHsWG=U6yO9op3yNFz0mXzf0aUPraHMBZe9nJYjiFWs=psQ@mail.gmail.com>
Howdy,

New to Moose, ran into something curious. Somewhere in the application I
got:


package Constants;

use constant TRUE => 1;
use constant FALSE => 0;


I know, I've read several postings of people grumbling that 1 in Perl means
true and 0 means false and to just get over it.  However, somewhere else I
got:


package Roles::Tuple;

use Moose::Role;
use Constants;
use Check;


and:


package Roles::Schema;

use Moose::Role;
use Constants
use Check;


and then I have:


package Tuple;

use Moose;
with 'Roles::Tuple', 'Roles::Schema';


If I try 'use Tuple'  I get:

'Due to method name conflicts in roles 'Roles::Schema' and 'Roles::Tuple',
the methods 'FALSE' and 'TRUE' must be implemented or excluded by 'Tuple''

Both 'Constants' and 'Check', which are used by 'Roles::Schema' and
'Roles::Tuple' also export several other variables and subroutines, but I
only run into problems with the constants TRUE and FALSE.

Any help will be greatly appreciated.  Cheers!


-- 
Marcos S. Barbeitos
Post-doctoral researcher
American Museum of Natural History
Department of Invertebrate Zoology
79 St and Central Park West
New York, NY 10024
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.