| 1 | =head1 NAME | ||
| 2 | |||
| 3 | RDF::Query::Functions::Kasei - RDF-Query-specific functions | ||
| 4 | |||
| 5 | =head1 VERSION | ||
| 6 | |||
| 7 | This document describes RDF::Query::Functions::Kasei version 2.919. | ||
| 8 | |||
| 9 | =head1 DESCRIPTION | ||
| 10 | |||
| 11 | Defines the following functions: | ||
| 12 | |||
| 13 | =over | ||
| 14 | |||
| 15 | =item * http://kasei.us/2007/09/functions/warn | ||
| 16 | |||
| 17 | =item * http://kasei.us/code/rdf-query/functions/bloom | ||
| 18 | |||
| 19 | =item * http://kasei.us/code/rdf-query/functions/bloom/filter | ||
| 20 | |||
| 21 | =back | ||
| 22 | |||
| 23 | =cut | ||
| 24 | |||
| 25 | package RDF::Query::Functions::Kasei; | ||
| 26 | |||
| 27 | 35 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 28 | 35 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 29 | 35 | ▶ | use Log::Log4perl; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 30 | 35 | our ($VERSION, $l); | |
| 31 | 35 | ▶ | BEGIN { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 32 | 35 | $l = Log::Log4perl->get_logger("rdf.query.functions.kasei"); | |
| 33 | 35 | $VERSION = '2.919'; | |
| 34 | } | ||
| 35 | |||
| 36 | 35 | ▶ | use Data::Dumper; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 37 | 35 | ▶ | use Scalar::Util qw(blessed reftype refaddr looks_like_number); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 38 | |||
| 39 | =begin private | ||
| 40 | |||
| 41 | =item C<< install >> | ||
| 42 | |||
| 43 | Documented in L<RDF::Query::Functions>. | ||
| 44 | |||
| 45 | =end private | ||
| 46 | |||
| 47 | =cut | ||
| 48 | |||
| 49 | sub install | ||
| 50 | 35 | ▶ | { |
|
Subroutine
install: called CC=1 SCAR=2.0
Pod
documented
| |||
| 51 | RDF::Query::Functions->install_function( | ||
| 52 | "http://kasei.us/2007/09/functions/warn", | ||
| 53 | 0 | ▶ | sub { |
|
Subroutine
__ANON__: not called CC=1 SCAR=2.6
| |||
| 54 | 0 | my $query = shift; | |
| 55 | 0 | my $value = shift; | |
| 56 | 0 | my $func = RDF::Query::Expression::Function->new( 'sparql:str', $value ); | |
| 57 | |||
| 58 | 0 | my $string = Dumper( $func->evaluate( undef, undef, {} ) ); | |
| 59 | 35 | ▶ | no warnings 'uninitialized'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 60 | 0 | warn "FILTER VALUE: $string\n"; | |
| 61 | 0 | return $value; | |
| 62 | } | ||
| 63 | 35 | ); | |
| 64 | } | ||
| 65 | |||
| 66 | |||
| 67 | 35 | 1; | |
| 68 | |||
| 69 | __END__ | ||