Attean::SPARQLClient - RDF blank nodes
This document describes Attean::SPARQLClient version 0.033
use v5.14; use Attean; my $client = Attean::SPARQLClient->new(endpoint => 'http://example.org/sparql'); my $results = $client->query('SELECT * WHERE { ?s ?p ?o }'); while (my $r = $results->next) { say $r->as_string; }
The Attean::SPARQLClient class provides an API to execute SPARQL queries against a remote SPARQL Protocol endpoint.
The following attributes exist:
endpoint
A URL of the remote service implementing the SPARQL 1.1 Protocol. This value is a Attean::API::IRI, but can be coerced from a string.
silent
request_signer
query_request( $sparql )
Returns an HTTP::Request object for the given SPARQL query string.
query( $sparql )
Executes the given SPARQL query string at the remote endpoint. If execution is successful, returns an Attean::API::Iterator object with the results. If execution fails but the client silent flag is true, returns an empty iterator. Otherwise raises an error via die.
die
Please report any bugs or feature requests to through the GitHub web interface at https://github.com/kasei/attean/issues.
SPARQL 1.1 Protocol
Gregory Todd Williams <gwilliams@cpan.org>
<gwilliams@cpan.org>
Copyright (c) 2014--2022 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Attean, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Attean
CPAN shell
perl -MCPAN -e shell install Attean
For more information on module installation, please visit the detailed CPAN module installation guide.