File: 02laziness.t

package info (click to toggle)
librdf-queryx-lazy-perl 0.003-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 136 kB
  • sloc: perl: 66; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 494 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use Test::More tests => 2;
use RDF::QueryX::Lazy;

my $query = RDF::QueryX::Lazy->new(<<SPARQL, {lazy => {ex=>'http://example.com/'}});
SELECT *
WHERE {
	?person foaf:name ?name .
	OPTIONAL { ?person ex:homepage ?page . }
}
SPARQL

ok($query, 'Yeah, probably works');
is($query->as_sparql."\n", <<SPARQL, 'Yeah, works');
PREFIX ex: <http://example.com/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT * WHERE {
	?person foaf:name ?name .
	OPTIONAL {
		?person ex:homepage ?page .
	}
}
SPARQL