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

πŸ’– RDF::Query::Algebra::Optional β€” bestie edition πŸ’–

okay so this is the RDF::Query::Algebra::Optional page, from the RDF::Query crew β€” it's the algebra class for Optional patterns (you know, the OPTIONAL { ... } girlies in SPARQL). It lives in the 3pm section of your manual pages, and it's giving very "quietly powerful supporting character" energy. πŸ¦‹


✨ VERSION ✨

This document describes RDF::Query::Algebra::Optional version 2.919. That's the one we're talking about, no cap. πŸ‘‘


🌸 METHODS 🌸

quick heads up before we get into it: beyond everything listed down here, this class inherits methods from the RDF::Query::Algebra class. So it's got lore beyond this page, iykyk. πŸ’…

  • new ( $pattern, $opt_pattern ) β€” hands you back a brand new Optional structure. Fresh out the box, sparkly, ready to go. ✨
  • construct_args β€” returns a list of arguments that, if you pass them straight into this class' constructor, will give you a clone of this algebra pattern. It's basically the build-a-bear instructions for this object. 🧸
  • pattern β€” returns the base pattern (that's the LHS, the left-hand side) that the optional pattern joins onto. The main character that everything else attaches to. πŸ’…
  • optional β€” returns the optional pattern β€” the RHS, right-hand side. This is the "if it's there, slay; if not, we move on" part. πŸ™ˆ
  • sse β€” returns the SSE string for this algebra expression. One string, fully expressing the whole algebra vibe.
  • as_sparql β€” returns the SPARQL string for this algebra expression. Yes bestie, it can speak SPARQL. πŸ—£οΈ
  • as_spin ( $model ) β€” adds statements to the given model to represent this algebra object in the SPARQL Inferencing Notation (http://www.spinrdf.org/). So it feeds $model the SPIN representation. Iconic interop behaviour. 🌈
  • as_hash β€” returns the query as a nested set of plain data structures β€” no objects invited to the party. Just hashes all the way down. πŸ“
  • type β€” returns the type of this algebra expression. What is it? It'll tell you.
  • referenced_variables β€” returns a list of the variable names used in this algebra expression. Every var that shows up gets a shoutout. πŸŽ€
  • potentially_bound β€” returns a list of the variable names used in this algebra expression that will bind values during execution. "Potentially" is doing a lot of work in that name and honestly, same. 😭
  • definite_variables β€” returns a list of the variable names that will be bound after evaluating this algebra expression. No maybes here. These ones are committed. πŸ’―

πŸ‘‘ AUTHOR πŸ‘‘

Gregory Todd Williams <gwilliams@cpan.org> β€” thank you for your service, king. 🫢


and that's the whole page, bestie! this lil doc came to you courtesy of perl v5.40.1, dated 2025-08-18, and it's a RDF::Q...ptional(3pm) situation β€” yes the header truncates it like that, tragic, we don't talk about it. πŸ’€ go forth and optional-pattern responsibly. πŸŒΈπŸ’–βœ¨

πŸ“¦ where this page comes from