---
name: "MooseX::TraitFor::Meta::TypeConstraint::Mooish"
section: "3pm"
platform: "linux"
package: "libmoosex-meta-typeconstraint-mooish-perl"
version: "0.001-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/MooseX::TraitFor::Meta::TypeConstraint::Mooish"
---

# MooseX::TraitFor::Meta::TypeConstraint::Mooish(3pm)

Handle Moo-style constraints

## NAME

MooseX::TraitFor::Meta::TypeConstraint::Mooish - Handle Moo-style constraints

## VERSION

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

## SYNOPSIS

This trait implements the functionality described in MooseX::Meta::TypeConstraint::Mooish, and you, dear reader, are encouraged to read about it over there.  Here we simply document the nuts and bolts.

## DESCRIPTION

```
    # determining where this goes is left as an exercise for the reader
    with 'MooseX::TraitFor::Meta::TypeConstraint::Mooish';
```

## ATTRIBUTES

### original\_constraint

The original constraint CodeRef is stashed away here.

### mooish

If true, the constraint should be considered written in the style of Moo constraints; that is, if an exception is thrown the constraint is considered to have failed; otherwise it passes.  Return values are ignored.

Default is true.

## METHODS

### original\_constraint()

Reader for the "original\_constraint" attribute; returns the original constraint as passed to **new()**.

### has\_original\_constraint()

Predicate for the "original\_constraint" attribute.

### mooish()

Reader for the "mooish" attribute.

### compile\_type\_constraint

If "mooish" is true, we wrap the "original\_constraint" in a sub that translates Moo behaviors (die on fail; otherwise success) to Moose::Meta::TypeConstraint expectations (false on fail; true on success).

We stash the original constraint in "original\_constraint" (surprise!), and set the constraint attribute to the wrapped constraint.

### create\_child\_type

Subtypes created here are not mooish, unless an explicit `"mooish ="` 1\> is passed.

## SEE ALSO

Please see those modules/websites for more information related to this module.

- •

  MooseX::Meta::TypeConstraint::Mooish

- •

  MooseX::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 **I do not expect to be gittip'ed or flattr'ed for this work**, rather **it is simply a very pleasant surprise**. 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
```
