| RDF-Query documentation | Contained in the RDF-Query distribution. |
RDF::Query::Functions - Standard Extension Functions
This document describes RDF::Query::Functions version 2.907.
This stub module simply loads all other modules named
RDF::Query::Functions::*. Each of those modules
has an install method that simply adds coderefs
to %RDF::Query::functions.
install_function ( $uri, \&func )install_function ( \@uris, \&func )Install the supplied CODE reference as the implementation for the given function URI(s).
RDF::Query::Functions::SPARQL, RDF::Query::Functions::Xpath, RDF::Query::Functions::Jena, RDF::Query::Functions::Geo, RDF::Query::Functions::Kasei.
Gregory Williams <gwilliams@cpan.org>, Toby Inkster <tobyink@cpan.org>.
| RDF-Query documentation | Contained in the RDF-Query distribution. |
# RDF::Query::Functions # -----------------------------------------------------------------------------
package RDF::Query::Functions; use strict; use warnings; no warnings 'redefine'; our $BLOOM_FILTER_LOADED; use Scalar::Util qw(refaddr); use Log::Log4perl; use Module::Pluggable search_path => [ __PACKAGE__ ], require => 1, inner => 1, sub_name => 'function_sets', ; ###################################################################### our ($VERSION, $l); BEGIN { $l = Log::Log4perl->get_logger("rdf.query.functions"); $VERSION = '2.907'; } ######################################################################
sub install_function { my $class = shift; while (@_) { my $uris = shift; my $func = shift; $RDF::Query::preferred_function_name{ refaddr($func) } = ref($uris) ? $uris->[0] : $uris; foreach my $uri (ref($uris) ? @$uris : $uris) { $RDF::Query::functions{$uri} = $func; } } } foreach my $function_set (__PACKAGE__->function_sets) { $function_set->install; } 1; __END__