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

πŸ‘‘ NAME πŸ’…

okay bestie, say hi to RDF::Trine::Parser::OwlFn β€” the OWL Functional Syntax Parser πŸ¦‹βœ¨ (it's a Perl module, manual section 3pm, from the User Contributed Perl Documentation, and yes it's serving exactly what it says on the tin).


🌈 SYNOPSIS 🌸

like, here's the whole vibe in three lines:

use RDF::Trine::Parser;
my $parser = RDF::Trine::Parser->new('owlfn');
$parser->parse_into_model($base_uri, $data, $model);

πŸ’– DESCRIPTION πŸ’–

πŸŽ€ Methods πŸŽ€

bestie listen β€” beyond the methods we're about to spill about below, this class inherits methods from the RDF::Trine::Parser class. so it's got lore you didn't even have to write. iconic.

✨ new(\%options) ✨

the only option supported here is filter, and it's literally there so you can tell the parser to ignore certain potentially boring triples. no cap.

$flt = RDF::Trine::Parser::OwlFn::ANNOTATION
     + RDF::Trine::Parser::OwlFn::ANNOTATION_ANNOTATION;
$parser = RDF::Trine::Parser->new('owlfn', filter=>$flt);

the following constants are defined for filtering purposes, and yes they are the whole menu:

  • ANNOTATION β€” axiom annotations
  • ONTOLOGY_ANNOTATION β€” ontology annotations
  • ANNOTATION_ANNOTATION β€” annotation annotations

the usual parse_* methods accept an argument called prefix_handler, and it can take a coderef that gets called every single time a prefix is defined by the ontology being parsed. 🫢 the coderef is called with two arguments: the prefix being defined (trailing colon included, don't forget it πŸ’…), and the full URI as a string.

also, the parse_* methods return a string containing the remainder of the input β€” i.e. potentially a tail which could not be parsed. so like, leftovers. the parser's unfinished business. 😭


πŸ”₯ SEE ALSO πŸ”₯


🫢 AUTHOR 🫢

Toby Inkster <tobyink@cpan.org>. the main character, honestly. πŸ‘‘


Copyright 2011-2012 Toby Inkster

this library is free software; you can redistribute it and/or modify it under any of the following licences, pick your fighter:


πŸ’€ DISCLAIMER OF WARRANTIES πŸ’€

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

like, no promises bestie, fr fr. πŸ™ˆ


and that's the whole page, from perl v5.32.1 dated 2021-09-24, page RDF::T...::OwlFn(3pm) β€” slay, you read the entire thing, we're obsessed with you πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from