develooper Front page | perl.moose | Postings from October 2014

overlapping attributes not detected

Thread Next
From:
John Macdonald
Date:
October 3, 2014 21:28
Subject:
overlapping attributes not detected
Message ID:
01EF6156B387B14E8278ECC376793BE18F53B997@exmb2.ad.oicr.on.ca
If you have a role and its consumer both specify the same attribute name (neither one using +name) there is no complaint from Moose and the second one encountered is used and the first is ignored.

I tracked this down after getting an error that the predicate method was not found - that was defined in the version of the attribute that was discarded without notice.

Could there be something done in the 'has' handler to detect such duplicates and give an error rather than this sort of quiet misaction?



John Macdonald
Software Engineer

Ontario Institute for Cancer Research
MaRS Centre

661 University Avenue

Suite 510
Toronto, Ontario

Canada M5G 0A3


Tel:

Email: John.Macdonald@oicr.on.ca

Toll-free: 1-866-678-6427
Twitter: @OICR_news


www.oicr.on.ca<http://www.oicr.on.ca/>

This message and any attachments may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this message in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this message may not be that of the organization.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About