Commits

Konstantin Baierer committed 68f8add

If an attribute has an rdf_formatter, handle it as a literal

Comments (0)

Files changed (2)

lib/MooseX/Semantic.pm

 package MooseX::Semantic;
 BEGIN { $MooseX::Semantic::AUTHORITY = 'cpan:KBA'; }
-BEGIN { $MooseX::Semantic::VERSION = '0.002'; }
+BEGIN { $MooseX::Semantic::VERSION = '0.003'; }
 
 1;
 

lib/MooseX/Semantic/Util/TypeConstraintWalker.pm

         # skip this attribute if the 'before' callback returns a true value
         next if $cb->{before}->($attr, $stash, @_);
         my $callback_name;
-        if ( ! $attr_type
+        if ( $attr->can('rdf_formatter')
+            || ! $attr_type
             || $attr_type eq 'Str'
             || $self->_find_parent_type( $attr_type, 'Num' )
             || $self->_find_parent_type( $attr_type, 'Bool' ))