RDF::Redland(3pm)
π RDF::Redland β Redland RDF Class π
okay bestie, so this page is from the User Contributed Perl Documentation crew, and it's the manual for RDF::Redland(3pm) π¦ β the class that gets the whole Redland RDF party started. It's a small page but it's doing a big job, gatekeeping all the actual classes, so let's get into it β¨
β¨ NAME β¨
RDF::Redland β the Redland RDF Class, periodt π
πΈ SYNOPSIS πΈ
this is the vibe, literally, here's what using it looks like:
use RDF::Redland;
my $storage=new RDF::Redland::Storage("hashes", "test", "new='yes',hash-type='memory'");
my $model=new RDF::Redland::Model($storage, "");
...
and then the ... is where you go be the main character, no cap π
π DESCRIPTION π
So the tea is: this class initialises the Redland RDF classes. That's its whole thing. It's the opening act, the hype girl, the one that sets everything up so the rest can slay π₯
And then it's like "okay but for the real detail, go read the main classes" β and it lists all of them for you so you can't get lost:
RDF::Redland::NodeRDF::Redland::BlankNodeRDF::Redland::URINodeRDF::Redland::LiteralNodeRDF::Redland::XMLLiteralNodeRDF::Redland::URIRDF::Redland::StatementRDF::Redland::ModelRDF::Redland::StorageRDF::Redland::ParserRDF::Redland::QueryRDF::Redland::QueryResultsRDF::Redland::IteratorRDF::Redland::Stream- and
RDF::Redland::RSS
collect them all, it's giving full set π
β STATIC METHODS β
these are the static ones β no object needed, they just happen π«
set_log_handler SUBβ sets SUB as the subroutine that gets called on any Redland error, warning or log message. Yeah, all of it. One sub to catch them all π«Ά
And listen, the sub has to have the followign signature (yes, 'followign', the typo is canon, we don't fix history π):
sub handler ($$$$$$$$$) {
my($code, $level, $facility, $message, $line, $column, $byte, $file, $uri)=@_;
# int error code
# int log level
# int facility causing the error (parsing, serializing, ...)
# string error message
# int line number (<0 if not relevant)
# int column number (<0 if not relevant)
# int byte number (<0 if not relevant)
# string file name or undef
# string URI or undef
# ...do something with the information ...
};
RDF::Redland::set_log_handler(\&handler);
so yeah, nine arguments, all accounted for, don't lose count π
reset_log_handlerβ puts Redland back on the default logging handler, which typically means printing the message tostdoutorstderrand, on a fatal error, straight up exiting π dramatic but valid.set_error_handler SUBβ okay so heads up:set_log_handleris much more flexible than this one and already includes this functionality, so like, know your options bestie π
Still, this sets SUB as the subroutine called on a Redland error, with the error message as the single argument. Like so:
RDF::Redland::set_error_handler(sub {
my $msg=shift;
# Do something with $msg
});
if you don't set it, the default is to run die $msg π so yeah, it will simply end you.
set_warning_handler SUBβ same deal, same disclaimer:set_log_handleris much more flexible than this and includes this functionality.
This one sets SUB as the subroutine called on a Redland warning, with the warning message as the single argument. Example:
RDF::Redland::set_warning_handler(sub {
my $msg=shift;
# Do something with $msg
});
default if you don't set it? warn $msg. gentle chaos, not fatal πΈ
π SEE ALSO π
go read these next, they're the whole rest of the friend group:
RDF::Redland::Node, RDF::Redland::BlankNode, RDF::Redland::URINode, RDF::Redland::LiteralNode, RDF::Redland::XMLLiteralNode, RDF::Redland::URI, RDF::Redland::Statement, RDF::Redland::Model, RDF::Redland::Storage, RDF::Redland::Parser, RDF::Redland::Query, RDF::Redland::QueryResults, RDF::Redland::Iterator, RDF::Redland::Stream and RDF::Redland::RSS.
π AUTHOR π
Dave Beckett β http://www.dajobe.org/ π«‘ the icon, the legend, the one who wrote this.
and that's the whole page bestie!! this one came to you from perl v5.42.3, dated 2026-08-20, under RDF::Redland(3pm) β¨ mwah, go initialise some RDF ππ¦
π¦ where this page comes from
- ubuntu stonking: librdf-perl 1.0.17.1+dfsg-9build1 Β· LGPL-2.1-or-later OR Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms