On Mon, Feb 18, 2013 at 08:35:16PM -0800, Ben Tilly wrote:
> This is documented, sort of.
> 
> http://search.cpan.org/dist/Moose/lib/Moose/Manual/Types.pod#WHAT_IS_A_TYPE?
> 
> Any Moose type is automatically a type.  Any created type is a type.
> Any reference to something unknown is assumed to be a type.  But the
> magic breaks down when you've got complex expressions, pieces of which
> are non-Moose classes.
> 
> So add in:
> 
> subtype 'Log::Any::Adaptor::Base', as 'Object', where
> {$_->isa('Log::Any::Adaptor::Base')};
> subtype 'Log::Any::Adapter::Null', as 'Object', where
> {$_->isa('Log::Any::Adapter::Null')};
> 
> and it should work.

A shorter way to write that is "class_type('Log::Any::Adaptor::Base')".

-doy

Reply via email to