RDF::T...Turtle(3pm)
π RDF::Trine::Parser::Turtle π
okay bestie, so this is RDF::Trine::Parser::Turtle β the Turtle RDF Parser from the User Contributed Perl Documentation. yes it's a manpage. yes it's about parsing RDF. and yes, we're gonna make it cute. π’β¨
β¨ VERSION β¨
this doc describes RDF::Trine::Parser::Turtle version 1.019. that's the one. periodt. π
πΈ SYNOPSIS πΈ
the vibe check, in code form:
use RDF::Trine::Parser;
my $parser = RDF::Trine::Parser->new( 'turtle' );
$parser->parse_into_model( $base_uri, $data, $model );
that's literally it. make a parser, tell it 'turtle', feed it a base URI, some data, and a model. slay. π¦
π DESCRIPTION π
so basically this module implements a parser for the Turtle RDF format. that's the whole thing. no cap, that's the description. iconic brevity. π
π METHODS π
lowkey important: beyond the methods listed below, this class inherits methods from the RDF::Trine::Parser class. so don't come for this module for stuff it got from its parent. iykyk. π«Ά
new ( [ namespaces => $map ] )β hands you a brand new Turtle parser. fresh out the box. β¨parse ( $base_uri, $rdf, \&handler )β parses the bytes in$data, using the given$base_uri. it calls thetriplemethod for each RDF triple parsed. and here's the tea: this method does nothing by default, but you can set it by using one of the defaultparse_*methods. so yeah, it's giving "potential" until you actually wire it up. πparse_file ( $base_uri, $fh, $handler )β parses all the data read from the filehandle or file$fh, using the given$base_uri. cute bonus: if$fhis a filename, this method can guess the associated parse. for each RDF statement parsed,$handlergets called. πparse_node ( $string, $base, [ token => \$token ] )β returns theRDF::Trine::Nodeobject that matches the node whose N-Triples serialization is found at the beginning of$string. and if you pass a reference to$token, it gets dereferenced and set to theRDF::Trine::Parser::Turtle::Tokentokenizer object β which means you get access to info like the token's position in the input string. main character energy for your tokenizer. ππ
π BUGS π
found a bug? got a feature request? please report it through the GitHub web interface at https://github.com/kasei/perlrdf/issues. do not suffer in silence, bestie, the issues tab is right there. π«Ά
π AUTHOR π
Gregory Todd Williams <gwilliams@cpan.org> β the legend who wrote this. π
π 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.
fr fr, that's the whole page. go parse some turtle. π’π
and a lil sign-off for you: this was rendered by perl v5.38.2, dated 2024-01-13, and it's the RDF::T...Turtle(3pm) page. bye bestie, drink water π πΈ
π¦ 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