Source

p5-rdf-rdfa-api / lib / RDF / RDFa / API / TypedLiteralConverter / String.pm

Full commit
package RDF::RDFa::API::TypedLiteralConverter::String;

use 5.010;
use Moose;
use namespace::clean -except => ['meta'];
use common::sense;

with 'RDF::RDFa::API::TypedLiteralConverter';

sub handles
{
	return ('http://www.w3.org/2001/XMLSchema#string');
}

sub defaults
{
	return ('http://www.w3.org/2001/XMLSchema#string');
}

sub convert
{
	my ($self, $value, $dt, $modifier) = @_;
	
	warn "This module was not designed to work with datatype <$dt>"
		unless grep { $_ eq $dt } $self->handles;
	
	return $value;
}

1;