RDF::T...FPatch(3pm)
π 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
$handlercallback 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 π
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
- debian trixie: librdf-trine-perl 1.019-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: librdf-trine-perl 1.019-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: librdf-trine-perl 1.019-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: librdf-trine-perl 1.019-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms