1Attean::Literal(3) User Contributed Perl Documentation Attean::Literal(3)
2
3
4
6 Attean::Literal - RDF Literals
7
9 This document describes Attean::Literal version 0.020
10
12 use v5.14;
13 use Attean;
14 my $langterm = Attean::Literal->new(value => 'foo', language => 'en-US');
15 $langterm->ntriples_string; # "foo"@en-US
16
17 my $typeterm = Attean::Literal->new(value => '123', datatype => 'http://www.w3.org/2001/XMLSchema#integer');
18 $langterm->ntriples_string; # "123"^^<http://www.w3.org/2001/XMLSchema#integer>
19
21 The Attean::Literal class represents RDF literals. It conforms to the
22 Attean::API::Literal role.
23
25 The following attributes exist:
26
27 "value"
28 "language"
29 "datatype"
30
32 "has_language"
33 Returns true if the literal has a language tag, false otherwise.
34
35 "true"
36 The xsd:true term.
37
38 "false"
39 The xsd:false term.
40
42 Please report any bugs or feature requests to through the GitHub web
43 interface at <https://github.com/kasei/attean/issues>.
44
47 Gregory Todd Williams "<gwilliams@cpan.org>"
48
50 Copyright (c) 2014--2018 Gregory Todd Williams. This program is free
51 software; you can redistribute it and/or modify it under the same terms
52 as Perl itself.
53
54
55
56perl v5.28.1 2019-01-09 Attean::Literal(3)