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::META::TYPECONSTRAINT::MOOISH (3)

.ds Aq ’

NAME

MooseX::Meta::TypeConstraint::Mooish - Translate Moo-style constraints to Moose-style

CONTENTS

VERSION

This document describes version 0.001 of MooseX::Meta::TypeConstraint::Mooish - released March 12, 2015 as part of MooseX-Meta-TypeConstraint-Mooish.

SYNOPSIS



    # easiest is via AttributeShortcuts
    use MooseX::AttributeShortcuts 0.028;

    has foo => (
        is  => rw,
        isa => sub { die unless $_[0] == 5 },
    );

    # or, the hard way
    use MooseX::Meta::TypeConstraint::Mooish;

    has foo => (
        is  => rw,
        isa => MooseX::Meta::TypeConstraint::Mooish->new(
            constraint => sub { die unless $_[0] == 5 },
        ),
    );



DESCRIPTION

Moose type constraints are expected to return true if the value passes the constraint, and false otherwise; Moo constraints, on the other hand, die if validation fails.

This metaclass allows for Moo-style constraints; it will wrap them and translate their Moo into a dialect Moose understands.

Note that this is largely to enable functionality in MooseX::AttributeShortcuts; the easiest way use this metaclass is by using that package. Also, as it’s not inconceivable that this functionality may be desired in other constraint metaclasses, the bulk of this metaclass’ functionality is implemented as a trait.

SEE ALSO

Please see those modules/websites for more information related to this module.
o MooseX::AttributeShortcuts
o MooseX::TraitFor::Meta::TypeConstraint::Mooish

SOURCE

The development version is on github at <http://https://github.com/RsrchBoy/moosex-meta-typeconstraint-mooish> and may be cloned from <git://https://github.com/RsrchBoy/moosex-meta-typeconstraint-mooish.git>

BUGS

Please report any bugs or feature requests on the bugtracker website https://github.com/RsrchBoy/moosex-meta-typeconstraint-mooish/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

Chris Weyl <cweyl@alumni.drew.edu>

    I’m a material boy in a material world

Please note <B>I do not expect to be gittip’ed or flattr’ed for this workB>, rather <B>it is simply a very pleasant surpriseB>. I largely create and release works like this because I need them or I find it enjoyable; however, don’t let that stop you if you feel like it ;)

Flattr this <https://flattr.com/submit/auto?user_id=RsrchBoy&url=https%3A%2F%2Fgithub.com%2FRsrchBoy%2Fmoosex-meta-typeconstraint-mooish&title=RsrchBoy’s%20CPAN%20MooseX-Meta-TypeConstraint-Mooish&tags=%22RsrchBoy’s%20MooseX-Meta-TypeConstraint-Mooish%20in%20the%20CPAN%22>, gittip me <https://www.gittip.com/RsrchBoy/>, or indulge my Amazon Wishlist <http://bit.ly/rsrchboys-wishlist>... If you so desire.

COPYRIGHT AND LICENSE

This software is Copyright (c) 2015 by Chris Weyl.

This is free software, licensed under:



  The GNU Lesser General Public License, Version 2.1, February 1999



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


perl v5.20.3 MOOSEX::META::TYPECONSTRAINT::MOOISH (3) 2015-03-13

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