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

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

πŸ’– RDF::T...Redland(3pm) πŸ’–

okay bestie, this is a page from the User Contributed Perl Documentation, section 3pm, and it's all about a Perl module that lives in the RDF::Trine family. sit down, grab a boba, we're parsing RDF with Redland today 🌸


✨ NAME ✨

RDF::Trine::Parser::Redland β€” it's an RDF Parser that uses the Redland library. that's the whole name, that's the whole vibe πŸŽ€


🌈 VERSION 🌈

This document describes RDF::Trine::Parser::Redland version 1.019. yes, that's the version, no cap πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

use RDF::Trine::Parser;
use RDF::Trine::Parser::Redland; # to overwrite internal dispatcher

# Redland does turtle, ntriples, trig and rdfa as well
my $parser = RDF::Trine::Parser->new( 'rdfxml' );
$parser->parse_into_model( $base_uri, $data, $model );

so like, you pull in RDF::Trine::Parser, and then if you want Redland to actually take over the internal dispatcher, you use RDF::Trine::Parser::Redland too β€” that second use is the main character move 🫢

and lowkey the tea: Redland also handles turtle, ntriples, trig and rdfa, not just the rdfxml in the example. obsessed ✨


πŸ’œ DESCRIPTION πŸ’œ

...

not me putting literal ... as the entire description πŸ’€ the original page really just says that. iconic behaviour, honestly. we move on πŸ™ˆ

πŸ‘‘ METHODS πŸ‘‘

Beyond the methods documented below, this class inherits methods from the RDF::Trine::Parser class. so yes, the family genes are strong, it's giving legacy code πŸ’–

  • new ( options => \%options ) β€” returns a brand new Redland parser object with the options you hand it. use the "name" option to tell Redland which parser it should use. that's the whole point, bestie β€” Redland needs to know which one you want πŸŽ€
  • parse_into_model ( $base_uri, $data, $model [, context => $context] ) β€” parses the bytes sitting in $data, using the given $base_uri. and for every single RDF statement it parses, it'll call "$model->add_statement( $statement )". so it's literally just feeding statements into your model one by one, slay ✨
  • parse ( $base_uri, $rdf, \&handler ) β€” that's it, that's the signature. no extra prose in the original, so no extra prose from me, periodt πŸ’…

🌸 ENVIRONMENT VARIABLES 🌸

set RDFTRINE_NO_REDLAND to something true to disable the Redland parsers. so if Redland is being a little too much, you can just flip that switch and it's gone, bye πŸ¦‹


πŸ’€ BUGS πŸ’€

Please report any bugs or feature requests to through the GitHub web interface at https://github.com/kasei/perlrdf/issues.

like, fr fr, if something's broken or you're craving a feature, that GitHub link is where you go. don't suffer in silence, bestie 😭🫢


🌟 AUTHOR 🌟

Gregory Todd Williams "<gwilliams@cpan.org>" β€” the legend himself, we love him, we thank him πŸ’œπŸ‘‘


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 like, free software, same terms as Perl itself, go wild responsibly ✨


and that's a wrap! this page was served up by perl v5.38.2 and dated 2024-01-13, so if you're reading it, you're in exactly the right timeline. bye bestie, go parse something pretty πŸŒˆπŸ’–

πŸ“¦ where this page comes from