RDF::Q...Literal(3pm)
π RDF::Query::Node::Literal β the bestie guide π
ok so. welcome to RDF::Query::Node::Literal, the RDF Node class for literals π β this is the Perl doc page for it, and yes it lives in the User Contributed Perl Documentation corner of the internet, we love that for it.
β¨ VERSION β¨
This document describes RDF::Query::Node::Literal version 2.919. that's the version. write it down bestie π
π¦ METHODS π¦
okay before we even get into it: this class does not only have the methods below. beyond the methods documented here, it also inherits methods from the RDF::Query::Node and RDF::Trine::Node::Literal classes. so if you're looking for something and it's not listed, check the parents fr fr π
datetimeβ gives you back aDateTimeobject from the literal, but ONLY if the literal value is in W3CDTF format. that's the condition, it's giving picky but in a cute way β¨as_sparqlβ returns the SPARQL string for this node. just the string bestie, that's it, that's the whole vibe πΈas_hashβ returns the query as a nested set of plain data structures, and the key detail here is no objects. literally none. just plain data. lowkey obsessed with how clean that is π«Άis_simple_literalβ returns true if the literal is "simple" β and by simple we mean a literal with no datatype and no language. if it's got either of those it's not simple, sorry, that's the rule πis_numeric_typeβ returns true if the literal is a known (xsd) numeric type. known ones only, don't come at it with your homemade type, it will not be recognized πnumeric_valueβ returns the numeric value of the literal β and note the tea: it does this even if the literal isn't a known numeric type. so yeah it'll still hand you a numeric value. that's the behaviour, no cap πtype_listβ returns a two-item list that's suitable for use as the second and third arguments to theRDF::Query::Node::Literalconstructor. the two values you get back correspond to literal language tag and literal datatype URI, respectively. order matters, respectively means respectively bestie π
π AUTHOR π
Gregory Todd Williams <gwilliams@cpan.org> π
k that's the whole page, go forth and slay your literals β¨
bye bestie!! this was perl v5.40.1, dated 2025-08-18, and the page was RDF::Q...Literal(3pm) β mwah, take care of her, she's iconic π
ππ
π¦ where this page comes from
- ubuntu resolute: librdf-query-perl 2.919-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: librdf-query-perl 2.919-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms