Source

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

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

use Module::Pluggable
	search_path   => ['RDF::RDFa::API::TypedLiteralConverter'],
	sub_name      => 'converters',
	require       => 1,
	instantiate   => 1;

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

requires 'convert';

BEGIN
{
	foreach my $converter (__PACKAGE__->converters)
	{
		next unless $converter->can('does') && $converter->does(__PACKAGE__);
		
		foreach my $type ($converter->defaults)
		{
			$RDF::RDFa::API::DataContext::DefaultConverters{$type} = $converter;
		}
	}
}

sub handles
{
	return;
}

sub defaults
{
	return;
}

1;