blob: 344a2317957f2f951e8b80a5f44e7bf2897339a9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package WWW::Unfuddle::Meta::Types;
use Moose::Util::TypeConstraints;
use DateTime::Format::ISO8601;
use JSON;
class_type 'JSON::Boolean';
subtype 'WWW::Unfuddle::Bool', as 'Bool', where { !ref($_) };
coerce 'WWW::Unfuddle::Bool', from 'JSON::Boolean',
via { $_ == JSON::true };
# 2009-06-16T22:55:06Z
class_type 'DateTime';
subtype 'WWW::Unfuddle::DateTime', as 'DateTime';
coerce 'WWW::Unfuddle::DateTime', from 'Str',
via { DateTime::Format::ISO8601->new->parse_datetime($_) };
enum 'WWW::Unfuddle::Assignee' => qw(reporter none nochange);
enum 'WWW::Unfuddle::ThemeColor' => qw(blue green grey orange purple red teal);
1;
|