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

πŸ’– RDF::Query::Parser::SPARQL β€” the SPARQL Parser ✨

ok bestie so this is RDF::Query::Parser::SPARQL, living in the User Contributed Perl Documentation section, and it's literally just... a SPARQL parser. that's the whole vibe. it parses SPARQL. slay.


🌸 VERSION

this doc is describing RDF::Query::Parser::SPARQL version 2.919. write it down, bestie, so you don't get confused later πŸ’…


πŸ¦‹ SYNOPSIS

the way you get in on this is:

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

that's it. that's the entrance. you make a $parser, you feed it a $query and a $base_uri, and you get back an $iterator. iconic behavior honestly ✨


πŸŽ€ DESCRIPTION

...

no literally, that's what it says. the description is three dots. it's giving mysterious. it's giving "the code IS the documentation." main character energy fr fr πŸ’€


πŸ‘‘ METHODS

so besides the methods listed down below, this class also inherits methods from the RDF::Query::Parser class. so if you're looking for something that isn't here, go check the parent, bestie 🫢

  • new β€” hands you back a new Turtle parser. yes. it says Turtle. in the SPARQL parser docs. we don't make the rules, we just report them πŸ’€ no cap.
  • parse ( $query, $base_uri ) β€” parses the $query, using the $base_uri you gave it. that's the whole job description and she does it flawlessly 🌟
  • parse_pattern ( $pattern, $base_uri, \%namespaces ) β€” parses the $pattern, using the given $base_uri, and returns a RDF::Query::Algebra pattern. note the \%namespaces hashref in there too, don't forget it πŸ™ˆ
  • parse_expr ( $pattern, $base_uri, \%namespaces ) β€” same deal, parses the $pattern with the given $base_uri, but this time it returns a RDF::Query::Expression pattern. expressions, not algebra. different girl, different slay πŸ’…
  • error β€” returns the error that showed up during the last parse. so when something goes wrong (and something will go wrong, it's parsing, it's giving chaos 😭), this is where you go to find out what.

quick vibe check: new says Turtle, parse_pattern gives you Algebra, parse_expr gives you Expression. keep your receipts, bestie 🧚

and that's the whole page, periodt πŸ’œ this was RDF::Q...SPARQL(3pm) from the User Contributed Perl Documentation, running on perl v5.40.1, dated 2025-08-18. go parse something gorgeous, you absolute icon πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from