RDF::T...FPatch(3pm)

πŸ“¦
version 1.019 Β· 7 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– RDF::Trine::Parser::RDFPatch πŸ’–

okay bestie, sit down, hydrate, and let me tell you about RDF::Trine::Parser::RDFPatch β€” the RDF-Patch Parser from the RDF::Trine family. yes it's Perl, yes it's giving very "load-bearing CPAN module", and yes I'm obsessed. πŸ¦‹


✨ VERSION ✨

this doc is describing RDF::Trine::Parser::RDFPatch version 1.019. write it down, remember it, put it in your notes app. πŸ’…


🌸 SYNOPSIS 🌸

the whole vibe, fr fr:

use RDF::Trine::Parser::RDFPatch;
my $serializer = RDF::Trine::Parser::RDFPatch->new();

that's it. that's the entrance. main character energy from line one. ✨


πŸŽ€ DESCRIPTION πŸŽ€

so the RDF::Trine::Parser::RDFPatch class is literally providing an API for serializing RDF graphs to the RDF-Patch syntax. that's the whole job. she does one thing and she does it well. periodt. πŸ‘‘


πŸ’œ METHODS πŸ’œ

πŸ’« new ( )

returns a shiny new RDF-Patch Parser object. fresh out the box, no cap. 🫢

πŸ’« namespace_map

returns the RDF::Trine::NamespaceMap object that's being used while parsing. it's the little map that keeps track of all your prefixes, and honestly? she's doing amazing. πŸ—ΊοΈβœ¨

πŸ’« parse ( $base_uri, $rdf, \&handler )

πŸ’« parse_file ( $base, $fh, \&handler )

πŸ’« handle_op ( $op, $handler, $lineno )

okay so these three are the trio. handle_op takes the RDF::Trine::Parser::RDFPatch::Op operation object and deals with it.

  • for 'A'dd operations, the $handler callback gets called with the RDF statement. good vibes, everything works, we love to see it. πŸ’–
  • for literally anything else? an exception is thrown. no soft launch, no warning, just straight to exception city. so be normal about your ops bestie, okay? 😭

πŸ’« parse_line ( $line, $base )

returns an operation object. one line in, one op out. so satisfying. πŸ“

πŸ’« new ( $op, @args )

returns a new RDF-Patch Parser operation object. yes, there are two news in this page β€” one for the parser, one for the operation object. they're different besties, don't mix them up. πŸ™ˆ


πŸ’€ BUGS πŸ’€

found a bug? got a feature request? please report it through the GitHub web interface at:

https://github.com/kasei/perlrdf/issues

that's the spot. don't suffer in silence, we're a community. 🫢


🌈 SEE ALSO 🌈

http://afs.github.io/rdf-patch/

go read the spec, it's lowkey iconic. πŸ“šβœ¨


πŸ‘‘ AUTHOR πŸ‘‘

Gregory Todd Williams β€” gwilliams@cpan.org

the legend herself. thank you for your service. πŸ«‘πŸ’–


Copyright (c) 2006-2012 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

so basically: be free, be open, be respectful. that's the license vibe. ✨


and that's the whole page, bestie!! πŸ’… this one came to you from perl v5.38.2 and it was last touched on 2024-01-13 β€” so it's vintage but it still slays. go parse something cute with it, mwah πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from