GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MOOSEX::ROLE::STRICT (3)

.ds Aq ’

NAME

MooseX::Role::Strict - use strict ’roles’

CONTENTS

VERSION

Version 0.05

SYNOPSIS

This code will fail at composition time:



    {
        package My::Role;
        use MooseX::Role::Strict;
        sub conflict {}
    }
    {
        package My::Class;
        use Moose;
        with My::Role;
        sub conflict {}
    }



With an error message similar to the following:



    The class My::Class has implicitly overridden the method (conflict) from
    role My::Role ...



To resolve this, explictly exclude the ’conflict’ method:



    {
        package My::Class;
        use Moose;
        with My::Role => { -excludes => conflict };
        sub conflict {}
    }



DESCRIPTION

<B>WARNINGB>: this is ALPHA code. More features to be added later.

When using Moose::Role, a class which provides a method a role provides will silently override that method. This can cause strange, hard-to-debug errors when the role’s methods are not called. Simple use MooseX::Role::Strict instead of Moose::Role and overriding a role’s method becomes a composition-time failure. See the synopsis for a resolution.

AUTHOR

Curtis Ovid Poe, <ovid at cpan.org>

BUGS

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

SUPPORT

You can find documentation for this module with the perldoc command.



    perldoc MooseX::Role::Strict



You can also look for information at:
o RT: CPAN’s request tracker

<http://rt.cpan.org/NoAuth/Bugs.html?Dist=MooseX-Role-Strict>

o AnnoCPAN: Annotated CPAN documentation

<http://annocpan.org/dist/MooseX-Role-Strict>

o CPAN Ratings

<http://cpanratings.perl.org/d/MooseX-Role-Strict>

o Search CPAN

<http://search.cpan.org/dist/MooseX-Role-Strict/>

ACKNOWLEDGEMENTS

TODO

Add -includes to make things easier:



 with Some::Role => { -includes => bar };



That reverses the sense of ’-excludes’ in case you’re more interested in the interface than the implementation. I’m unsure of the syntax for auto-converting a role to a pure interface.

COPYRIGHT & LICENSE

Copyright 2009 Curtis Ovid Poe, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 MOOSEX::ROLE::STRICT (3) 2011-04-16

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.