1MooseX::Role::Strict(3)User Contributed Perl DocumentatioMnooseX::Role::Strict(3)
2
3
4

NAME

6       MooseX::Role::Strict - use strict 'roles'
7

VERSION

9       Version 0.05
10

SYNOPSIS

12       This code will fail at composition time:
13
14           {
15               package My::Role;
16               use MooseX::Role::Strict;
17               sub conflict {}
18           }
19           {
20               package My::Class;
21               use Moose;
22               with 'My::Role';
23               sub conflict {}
24           }
25
26       With an error message similar to the following:
27
28           The class My::Class has implicitly overridden the method (conflict) from
29           role My::Role ...
30
31       To resolve this, explictly exclude the 'conflict' method:
32
33           {
34               package My::Class;
35               use Moose;
36               with 'My::Role' => { -excludes => 'conflict' };
37               sub conflict {}
38           }
39

DESCRIPTION

41       WARNING:  this is ALPHA code.  More features to be added later.
42
43       When using Moose::Role, a class which provides a method a role provides
44       will silently override that method.  This can cause strange, hard-to-
45       debug errors when the role's methods are not called.  Simple use
46       "MooseX::Role::Strict" instead of "Moose::Role" and overriding a role's
47       method becomes a composition-time failure.  See the synopsis for a
48       resolution.
49

AUTHOR

51       Curtis "Ovid" Poe, "<ovid at cpan.org>"
52

BUGS

54       Please report any bugs or feature requests to "bug-moosex-role-strict
55       at rt.cpan.org", or through the web interface at
56       <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MooseX-Role-Strict>.  I
57       will be notified, and then you'll automatically be notified of progress
58       on your bug as I make changes.
59

SUPPORT

61       You can find documentation for this module with the perldoc command.
62
63           perldoc MooseX::Role::Strict
64
65       You can also look for information at:
66
67       ·   RT: CPAN's request tracker
68
69           <http://rt.cpan.org/NoAuth/Bugs.html?Dist=MooseX-Role-Strict>
70
71       ·   AnnoCPAN: Annotated CPAN documentation
72
73           <http://annocpan.org/dist/MooseX-Role-Strict>
74
75       ·   CPAN Ratings
76
77           <http://cpanratings.perl.org/d/MooseX-Role-Strict>
78
79       ·   Search CPAN
80
81           <http://search.cpan.org/dist/MooseX-Role-Strict/>
82

ACKNOWLEDGEMENTS

TODO

85       Add "-includes" to make things easier:
86
87        with 'Some::Role' => { -includes => 'bar' };
88
89       That reverses the sense of '-excludes' in case you're more interested
90       in the interface than the implementation.  I'm unsure of the syntax for
91       auto-converting a role to a pure interface.
92
94       Copyright 2009 Curtis "Ovid" Poe, all rights reserved.
95
96       This program is free software; you can redistribute it and/or modify it
97       under the same terms as Perl itself.
98
99
100
101perl v5.28.1                      2019-02-02           MooseX::Role::Strict(3)
Impressum