1Attean::SPARQLClient(3)User Contributed Perl DocumentatioAnttean::SPARQLClient(3)
2
3
4
6 Attean::SPARQLClient - RDF blank nodes
7
9 This document describes Attean::SPARQLClient version 0.033
10
12 use v5.14;
13 use Attean;
14 my $client = Attean::SPARQLClient->new(endpoint => 'http://example.org/sparql');
15 my $results = $client->query('SELECT * WHERE { ?s ?p ?o }');
16 while (my $r = $results->next) {
17 say $r->as_string;
18 }
19
21 The Attean::SPARQLClient class provides an API to execute SPARQL
22 queries against a remote SPARQL Protocol endpoint.
23
25 The following attributes exist:
26
27 "endpoint"
28 A URL of the remote service implementing the SPARQL 1.1 Protocol.
29 This value is a Attean::API::IRI, but can be coerced from a string.
30
31 "silent"
32 << user_agent >>
33 "request_signer"
34
36 "query_request( $sparql )"
37 Returns an HTTP::Request object for the given SPARQL query string.
38
39 "query( $sparql )"
40 Executes the given SPARQL query string at the remote endpoint. If
41 execution is successful, returns an Attean::API::Iterator object
42 with the results. If execution fails but the client "silent" flag
43 is true, returns an empty iterator. Otherwise raises an error via
44 "die".
45
47 Please report any bugs or feature requests to through the GitHub web
48 interface at <https://github.com/kasei/attean/issues>.
49
51 SPARQL 1.1 Protocol <https://www.w3.org/TR/sparql11-protocol/>
52
54 Gregory Todd Williams "<gwilliams@cpan.org>"
55
57 Copyright (c) 2014--2022 Gregory Todd Williams. This program is free
58 software; you can redistribute it and/or modify it under the same terms
59 as Perl itself.
60
61
62
63perl v5.36.0 2022-10-03 Attean::SPARQLClient(3)