Catman...f_query(3pm)
π Catmandu::Fix::aref_query β aka Catman...f_query(3pm) π
ok so bestie, this is a page from the User Contributed Perl Documentation and it's literally all about one lil Fix module. yes the header truncates the name to Catman...f_query(3pm), we don't make the rules, we just vibe with them π«Ά
β¨ NAME β¨
Catmandu::Fix::aref_query β copy values of RDF in aREF to a new field π
πΈ SYNOPSIS πΈ
So you can call this thing in Catmandu Fix language, like:
aref_query( dc_title => title )
aref_query( query => 'dc_title', field => 'title' )
aref_query( 'http://example.org/subject', dc_title => title )
and you can also call it straight up from Perl code, no cap:
use Catmandu::Fix::aref_query as => 'my_query';
use RDF::aREF;
my $rdf = encode_aref("example.ttl");
my_query( $rdf, dc_title => 'title' );
like, yes queen, that's the whole thing π
π¦ DESCRIPTION π¦
ok so listen. This Catmandu::Fix is the one you want when you've imported some RDF and you need to map its values. It works on data given in the aREF structure, and the link for that is right here: <http://gbv.github.io/aREF/>. it's giving "translate my RDF into something a lil more friendly" energy and honestly? obsessed π₯
π ARGUMENTS π
here's where the tea gets specific. three arguments, and you need to know what each one is doing:
subjectβ this one is optional, it's the subject URI and it goes first. But here's the quirky bit: by default, the fields"_uri"and"_uri"are used. yes. it says_uritwice. that's what the page says, that's what I'm telling you, we're not touching it πqueryβ the aREF query expression, and it can be either the first or the second argument depending on how you're calling it.pathβ the field name you're mapping the RDF data to, and it's the last argument. Good news bestie: existing values are also kept, nothing gets yeeted π
β SEE ALSO β
go look at the function "aref_query" in RDF::aREF β that's the whole list, iykyk π
and that's a wrap, gorgeous π this page is from perl v5.36.0, dated 2022-12-06, and the footer calls it Catman...f_query(3pm) one more time because it loves a dramatic entrance. mwah πβ¨π¦
π¦ 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