DOKK / manpages / debian 12 / libattean-perl / Attean::Literal.3pm.en
Attean::Literal(3pm) User Contributed Perl Documentation Attean::Literal(3pm)

Attean::Literal - RDF Literals

This document describes Attean::Literal version 0.033

  use v5.14;
  use Attean;
  my $langterm = Attean::Literal->new(value => 'foo', language => 'en-US');
  $langterm->ntriples_string; # "foo"@en-US
  my $typeterm = Attean::Literal->new(value => '123', datatype => 'http://www.w3.org/2001/XMLSchema#integer');
  $langterm->ntriples_string; # "123"^^<http://www.w3.org/2001/XMLSchema#integer>

The Attean::Literal class represents RDF literals. It conforms to the Attean::API::Literal role.

The following attributes exist:

"value"
"language"
"datatype"

"has_language"
Returns true if the literal has a language tag, false otherwise.
"true"
The xsd:true term.
"false"
The xsd:false term.

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

Gregory Todd Williams "<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.

2022-10-06 perl v5.34.0