NAME

Meerkat::Types - Moose types for Meerkat

VERSION

version 0.016

SYNOPSIS

    use Meerkat::Types qw/:all/;

    has birthday => (
        is      => 'ro',
        isa     => MeerkatDateTime,
        coerce  => 1,
    );

DESCRIPTION

This module defines Moose types and coercions.

TYPES

MeerkatDateTime

This type is a Meerkat::DateTime. It defines coercions from Num (an epoch value), DateTime, DateTime::Tiny, and BSON::Time.

It also sets up a MooseX::Storage type handler that 'collapses' to a DateTime object for storage by the MongoDB client, but 'expands' from an epoch value provided by the MongoDB client back into a Meerkat::DateTime object.

AUTHOR

David Golden <dagolden@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2013 by David Golden.

This is free software, licensed under:

  The Apache License, Version 2.0, January 2004