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

πŸ“¦
version 0.101 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

πŸ’– NAME πŸ’–

RDF::Trine::Serializer::RDFa β€” bestie, it's the RDFa Serializer for RDF::Trine. That's the whole vibe. And yes, the manpage itself lives at RDF::T...::RDFa(3pm) in the User Contributed Perl Documentation, iykyk. πŸ’…


✨ SYNOPSIS ✨

Like, the tiniest taste of how you'd actually use it:

use RDF::Trine::Serializer;

my $s = RDF::Trine::Serializer->new('RDFa', style => 'HTML::Hidden');
my $string = $s->serialize_model_to_string($model);

That's it. That's the whole flex. 🫢


🌸 DESCRIPTION 🌸

Okay so RDF::Trine::Serializer is the class that gives you an API for serializing RDF graphs into strings and into files. And this subclass? It's the glow-up that does RDFa serialization, via RDF::RDFa::Generator. Periodt. ✨

The plan β€” the whole main character arc β€” is that this module will replace the RDF::Trine compatibility methods that live in RDF::RDFa::Generator, which are now deprecated. And why are we doing all this? So that both RDF::Trine and Attean can use it, without either of them being forced to require the other as a dependency. Iconic behaviour, honestly. πŸ‘‘


πŸŽ€ METHODS πŸŽ€

So beyond the methods we're about to spill about below, this class also inherits methods from the RDF::Trine::Serializer class. Freebies, bestie. 🎁

  • new β€” returns a brand-new RDFa serializer object. Any arguments you hand it get passed along to RDF::RDFa::Generator, so go peek at its documentation for the deets. That includes a style argument, which names a module that formats the output for you. On top of that, you can pass a generator_options argument β€” that one gets passed to the generator's create_document methods as options, and it's typically where you'd put style-specific configuration. Very demure, very mindful. πŸ’…
  • serialize_model_to_file ( $fh, $model ) β€” serializes the $model to RDFa, and prints the results to the filehandle you supplied, $fh. πŸ–¨οΈ
  • serialize_model_to_string ( $model ) β€” serializes the $model to RDFa and hands the result back to you as a string. 🧡
  • serialize_iterator_to_file ( $file, $iter ) β€” serializes the iterator to RDFa, printing the results to the filehandle you supplied, $fh. πŸ“
  • serialize_iterator_to_string ( $iter ) β€” serializes the iterator to RDFa and returns the result as a string. 🌈

πŸ’€ BUGS πŸ’€

Found a bug? Don't suffer in silence, bestie β€” please report any bugs to <https://github.com/kjetilk/p5-rdf-trine-serializer-rdfa/issues>. The maintainers are listening. πŸ™ˆ


πŸ¦‹ SEE ALSO πŸ¦‹

Go read up on these, they're the whole friend group:

  • RDF::RDFa::Generator
  • RDF::Trine
  • Attean

πŸ’œ ACKNOWLEDGEMENTS πŸ’œ

Giving credit where credit is due, always. This module is mostly a straightforward port, with substantial cutnpaste, from RDF::RDFa::Generator and RDF::Trine, by Toby Inkster and Gregory Todd Williams respectively. Legends. πŸ‘‘


πŸ‘‘ AUTHOR πŸ‘‘

Kjetil Kjernsmo <kjetilk@cpan.org>.


This software is copyright (c) 2017, 2018, 2019 by Kjetil Kjernsmo.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Slay, honestly. πŸ’–


⚠️ 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.

No cap, it really does say that. Read it twice. 😭


And that's the whole page, bestie! Shoutout to perl v5.36.0 and the date 2022-12-04, which is when this little gem of a manpage got its last glow-up. πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from