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

πŸ’– RDF::Q...Parser(3pm) β€” bestie edition πŸ’–

okay so. you found the page for RDF::Query::Parser, the Perl doc for it, and honestly? it's giving parser base class energy. like, this is the blueprint. everything else in the parser family is lowkey cosplaying off this one. 🧚


✨ NAME ✨

RDF::Query::Parser β€” parser base class. that's it, that's the whole vibe. πŸ‘‘


🌸 VERSION 🌸

this doc describes RDF::Query::Parser version 2.919. locked in, no cap. ✨


πŸ’… METHODS πŸ’…

k so these are the constructor-ish methods your subclass gets to play with. each one hands you back a structure. go off, bestie. 🫢

  • new_literal ( $literal, $language, $datatype ) β€” returns a new literal structure. the trio of $literal, $language and $datatype walk in, a literal walks out. iconic. πŸ’–
  • new_variable ( $name ) β€” returns a new variable structure. takes $name, gives you a variable. periodt.
  • new_blank ( $name ) β€” returns a new blank node structure, built from $name. blank nodes stay mysterious, we respect that. πŸ¦‹
  • new_uri ( $uri ) β€” returns a new variable structure. yes bestie, the doc literally says variable here, not URI. not me reading it three times 😭 i'm just reporting what's on the page, word for word, iykyk. takes $uri.
  • new_triple ( $s, $p, $o ) β€” returns a new triple structure. subject, predicate, object β€” the holy trinity, the trio, the main characters. ⭐
  • new_unary_expression ( $operator, $operand ) β€” returns a new unary expression structure. one $operator, one $operand, no notes. πŸ’œ
  • new_binary_expression ( $operator, @operands ) β€” returns a new binary expression structure. takes an $operator and a whole lil list of @operands. slay.
  • new_function_expression ( $function, @operands ) β€” returns a new function expression structure. $function plus its @operands besties. πŸ”₯
  • new_alias_expression ( $alias, $expression ) β€” returns a new alias expression structure. an $alias and an *$expression, holding hands. πŸŽ€
  • new_filter ( $filter_expr, $pattern ) β€” returns a new filter structure. $filter_expr and $pattern β€” the filter duo does not miss. 🌈
  • fail ( $error ) β€” sets the current error to $error. this is the dramatic one. πŸ’€ if the parser is in commit mode (which happens when you call set_commit), it throws an RDF::Query::Error::ParseError object. otherwise it just returns undef and keeps it cute. so like. if you're in commit mode, bestie, it does not simply return β€” it throws. be aware. ✨
  • error () β€” returns the last error the parser experienced. the receipts. the archived screenshots of the group chat. 🫢
ngl, that fail one is the moment of the page. commit mode = it throws a RDF::Query::Error::ParseError; not-commit mode = undef and a shrug. know which mode you're in before you call it, fr fr. πŸ™ˆ

πŸ‘‘ AUTHOR πŸ‘‘

Gregory Williams <gwilliams@cpan.org> β€” the author. the icon. the moment. give them their flowers. 🌸


and that's the whole page, babes. this was perl v5.40.1, dated 2025-08-18, and that's your sign-off β€” go parse something gorgeous. πŸ¦‹βœ¨πŸ’–

πŸ“¦ where this page comes from