On Fri, Oct 26, 2012 at 09:00:27PM +0000, Jeff Benton wrote: > Is there a way to tell if a moose attribute type is a primary type? For > example, I want to tell the difference between an attribute that is a Str and > an attribute that is some type of reference.
my $type = Moose::Util::TypeConstraints::find_or_create_type_constraint($type_name); print "$type_name is a reference!\n" if $type->is_a_type_of('Ref');