File Coverage

blib/lib/RDF/Query/Functions/Kasei.pm
Criterion Covered Total %
statement 21 27 77.7
branch n/a
condition n/a
subroutine 8 9 88.8
pod 1 1 100.0
total 30 37 81.0


line stmt bran cond sub pod time code
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.916.
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     35   32294 use strict;
  35         86  
  35         1002  
28 35     35   200 use warnings;
  35         78  
  35         1062  
29 35     35   225 use Log::Log4perl;
  35         86  
  35         379  
30             our ($VERSION, $l);
31             BEGIN {
32 35     35   3408 $l = Log::Log4perl->get_logger("rdf.query.functions.kasei");
33 35         17011 $VERSION = '2.916';
34             }
35              
36 35     35   243 use Data::Dumper;
  35         78  
  35         2139  
37 35     35   226 use Scalar::Util qw(blessed reftype refaddr looks_like_number);
  35         87  
  35         4936  
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             {
51             RDF::Query::Functions->install_function(
52             "http://kasei.us/2007/09/functions/warn",
53             sub {
54 0     0   0 my $query = shift;
55 0         0 my $value = shift;
56 0         0 my $func = RDF::Query::Expression::Function->new( 'sparql:str', $value );
57            
58 0         0 my $string = Dumper( $func->evaluate( undef, undef, {} ) );
59 35     35   209 no warnings 'uninitialized';
  35         89  
  35         3078  
60 0         0 warn "FILTER VALUE: $string\n";
61 0         0 return $value;
62             }
63 35     35 1 294 );
64             }
65              
66              
67             1;
68              
69             __END__
70              
71             =head1 AUTHOR
72              
73             Gregory Williams <gwilliams@cpan.org>.
74              
75             =cut