Subject: | Bug, or am I failing to get it? |
Date: | Mon, 24 Nov 2008 17:47:04 +0000 |
To: | bug-MooseX-Types [...] rt.cpan.org |
From: | Tomas Doran <t0m [...] state51.co.uk> |
I'm quite sure that this is probably user error, but the following
doesn't work for me currently:
package MyTypes;
use MooseX::Types::Moose qw/ Str /;
use MooseX::Types -declare => [qw/ FooType /];
subtype FooType => as Str => where { 1 };
package MyClass;
use Moose;
use MyTypes qw/FooType/;
has foo => ( isa => FooType );
package main;
use MyClass;
MyClass->new(foo => 'moo');
What am I doing wrong?
Cheers
t0m