Excerpts from Jesse Luehrs's message of Mon Feb 15 19:31:24 -0500 2010:
> I'm not sure what problem you're having, since you didn't post the
> error message, but you probably need the attribute definition to happen
> after the types are defined... pretty sure this would assume you have a
> class named 'MaybeDateTime'.
Correct.
> > subtype 'DateTime' => as 'Object' => where { $_->isa('DateTime') };
>
> Also, this is equivalent to "class_type 'DateTime'".
>
> > subtype 'MaybeDateTime'
> > => as 'Maybe[Object]'
> > => where { $_->isa('DateTime') or not defined $_ };
And this is "subtype 'MaybeDateTime', as 'Maybe[DateTime]'".
hdp.