Commits

Konstantin Baierer committed d036be8

Added generic type coercion for literals and ArrayOfTrineLiterals

  • Participants
  • Parent commits 1c2b5dd

Comments (0)

Files changed (1)

File lib/MooseX/Semantic/Types.pm

     from Bool, via { RDF::Trine::Node::Literal->new($_, undef, $xsd->boolean); },
     from Num, via { RDF::Trine::Node::Literal->new($_, undef, $xsd->numeric); },
     from Str, via { RDF::Trine::Node::Literal->new($_, undef, $xsd->string); },
+    from Value, via { RDF::Trine::Node::Literal->new($_); },
 );
 coerce( ArrayOfTrineLiterals,
-    from ArrayRef[Value], via { my $u = $_; [map {TrineLiteral->coerce($_)} @$u] },
+    from ArrayRef, via { my $u = $_; [map {TrineLiteral->coerce($_)} @$u] },
 );