---
name: "Attean::SPARQLClient"
section: "3pm"
platform: "linux"
package: "libattean-perl"
version: "0.035-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Attean::SPARQLClient"
---

# Attean::SPARQLClient(3pm)

RDF blank nodes

## NAME

Attean::SPARQLClient - RDF blank nodes

## VERSION

This document describes Attean::SPARQLClient version 0.035

## SYNOPSIS

```
  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;
  }
```

## DESCRIPTION

The Attean::SPARQLClient class provides an API to execute SPARQL queries against a remote SPARQL Protocol endpoint.

## ATTRIBUTES

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"

  - \<\< user\_agent \>\>

  - "request\_signer"

  ## METHODS

- 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"`.

## BUGS

Please report any bugs or feature requests to through the GitHub web interface at \<https://github.com/kasei/attean/issues\>.

## SEE ALSO

SPARQL 1.1 Protocol \<https://www.w3.org/TR/sparql11-protocol/\>

## AUTHOR

Gregory Todd Williams  `"<gwilliams@cpan.org>"`

## COPYRIGHT

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.
