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.918.
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   21911 use strict;
  35         63  
  35         971  
28 35     35   137 use warnings;
  35         49  
  35         879  
29 35     35   129 use Log::Log4perl;
  35         46  
  35         293  
30             our ($VERSION, $l);
31             BEGIN {
32 35     35   2594 $l = Log::Log4perl->get_logger("rdf.query.functions.kasei");
33 35         11341 $VERSION = '2.918';
34             }
35              
36 35     35   190 use Data::Dumper;
  35         52  
  35         1732  
37 35     35   148 use Scalar::Util qw(blessed reftype refaddr looks_like_number);
  35         71  
  35         3802  
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   169 no warnings 'uninitialized';
  35         63  
  35         2509  
60 0         0 warn "FILTER VALUE: $string\n";
61 0         0 return $value;
62             }
63 35     35 1 262 );
64             }
65              
66              
67             1;
68              
69             __END__
70              
71             =head1 AUTHOR
72              
73             Gregory Williams <gwilliams@cpan.org>.
74              
75             =cut