RDF::T...Redland(3pm)
π 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 π
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
- 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