Catman...er::RDF(3pm)
β¨ NAME β¨
Catmandu::Exporter::RDF β it serializes RDF data. That's the whole vibe, bestie, and it does it flawlessly π
(Also hi, this is the Catman...er::RDF(3pm) page from the User Contributed Perl Documentation, so you're in the right place π«Ά)
π SYNOPSIS π
In Perl code:
use Catmandu -all;
my $exporter = exporter('RDF',
file => 'export.rdf',
type => 'XML',
fix => 'rdf.fix'
);
$exporter->add( $aref ); # pass RDF data in aREF encoding
$exporter->commit;
π¦ DESCRIPTION π¦
So like β this Catmandu::Exporter exports RDF data in different RDF serializations. Multiple flavors, one exporter, no cap π₯
π CONFIGURATION π
fileβ it's here! That's literally all the page gives us on it πfhβ also here, also no extra deets. iconic mystery behavior πencodingβ same situation, queen of saying nothing π«Άfixβ Default configuration options ofCatmandu::Exporter. The option"fix"is supported as derived fromCatmandu::Fixable. For every"add"or for every item in"add_many"the given fixes will be applied first. So the fixes run before anything else gets to touch your data β first in line, main character energy πtypeβ okay so you set your serialization form with the option"type", and the default value is"NTriples". This option must refer to a subclass ofRDF::Trine::Serializer, for instance"Turtle"for RDF/Turtle withRDF::Trine::Serializer::Turtle. The first letter gets transformed uppercase, soformat => 'turtle'will work as well π§ In addition there are aliases:"ttl"for"Turtle","n3"for"Notation3","xml"and"XML"for"RDFXML", and"json"for"RDFJSON".
When the option"type"is set to'NTriples'the export can be streamed. In all other cases the results are exported in bulk aftercommit(). So yeah β streamed or bulk, pick your fighter β
nsβ the option"ns"can refer to an instance of, or to a constructor argument of,RDF::NS. Use a fixed date, such as20130816, to make sure your URI namespace prefixes are stable. Stable prefixes = stable mental health, fr fr π
π METHODS π
See also Catmandu::Exporter.
π« add( ... ) π«
RDF data is added given in another RDF Encoding Form (aREF) as implemented with RDF::aREF and defined at <http://github.com/gbv/aref>. That's the aREF lore, iykyk π
π« count π«
Returns the number of times "add" has been called. In contrast to other Catmandu exporters, this does not reflect the number of exporter records, because RDF data is always merged to one RDF graph. One graph, one truth, no duplicates π
π« uri( $uri ) π«
Expand and abbreviated with RDF::NS. For instance "dc:title" is expanded to "http://purl.org/dc/elements/1.1/title". Glow-up of the century honestly β¨
πΈ SEE ALSO πΈ
Serialization is based on RDF::Trine::Serializer. Go give it a follow π¦
That's the whole page, bestie β this was perl v5.36.0, dated 2022-12-06, serving Catman...er::RDF(3pm) realness from the User Contributed Perl Documentation. Periodt. π
ππ
π¦ where this page comes from
- debian bookworm: libcatmandu-rdf-perl 0.32-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatmandu-rdf-perl 0.32-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatmandu-rdf-perl 0.32-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: libcatmandu-rdf-perl 0.32-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms