RDF::Q...ARQL11(3pm)

πŸ’– RDF::Q...ARQL11 β€” the SPARQL 1.1 Parser page, but make it a group chat πŸ’–

okay bestie, so this one is from the User Contributed Perl Documentation section of your man pages, and it's all about RDF::Query::Parser::SPARQL11. Yes the title in the header is doing that abbreviating thing (RDF::Q...ARQL11) because man pages are dramatic like that. Anyway. Sit down, grab a strawberry πŸ“, we're parsing SPARQL 1.1 today.


✨ NAME ✨

RDF::Query::Parser::SPARQL11 β€” the SPARQL 1.1 Parser. That's it. That's the whole name. Iconic minimalism.


🌸 VERSION 🌸

This doc is describing RDF::Query::Parser::SPARQL11 version 2.919. Locked in, no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

the vibe check, in code form:

use RDF::Query::Parser::SPARQL11;
my $parser     = RDF::Query::Parser::SPARQL11->new();
my $iterator = $parser->parse( $query, $base_uri );

like, you make a parser, you feed it a query and a base URI, and it hands you back an iterator. the way that works is honestly so clean of it πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

...

and yes, that is literally the entire description. three dots. the original author said "the code speaks for itself" and honestly? main character energy. we respect it. 🫢


πŸ‘‘ METHODS πŸ‘‘

first things first, queen: beyond every method listed down here, this class also inherits methods from the RDF::Query::Parser class. so don't come for it about missing methods, it got them from its parent. generational wealth, basically. ✨

  • new β€” hands you back a brand new SPARQL 1.1 parser object. fresh out the box, still got the tags on. 🎁
  • parse ( $query, $base_uri, $update_flag ) β€” parses the $query using the $base_uri you gave it. and here's the tea: if $update_flag is true, the query gets parsed allowing SPARQL 1.1 Update statements. so like, flip that flag if you want updates, leave it alone if you don't. your call bestie.
  • parse_pattern ( $pattern, $base_uri, \%namespaces ) β€” parses the $pattern using the given $base_uri, and returns a RDF::Query::Algebra pattern. very demure, very mindful. 🧚
  • parse_expr ( $pattern, $base_uri, \%namespaces ) β€” same deal, parses the $pattern with the given $base_uri, but this one returns a RDF::Query::Expression pattern. siblings but make it different return types. 😌
  • error β€” returns the error that got encountered during the last parse. aka the receipts from whatever just went wrong. if your parse flops, this is where the truth lives. πŸ’€

lowkey important reminder: whenever you're reading docs for a subclass like this, don't forget the inherited methods from RDF::Query::Parser. they're not listed here but they're absolutely there, doing the work behind the scenes. iykyk. 🌈

and that's the whole page, bestie!! no SEE ALSO section, no author credits, nothing else hiding at the bottom. this doc is short and it knows it. πŸ’–

this masterpiece was brought to you by perl v5.40.1 on 2025-08-18. go forth and parse your SPARQL 1.1, you absolute legend. periodt. πŸ‘‘βœ¨πŸ¦‹

πŸ“¦ where this page comes from