RDF::DOAP(3pm)

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

πŸ’– RDF::DOAP πŸ’–

okay bestie, so this is a User Contributed Perl Documentation page for RDF::DOAP(3pm) and honestly? it's giving "I read RDF so you don't have to" energy and we're obsessed. ✨


🌸 NAME 🌸

RDF::DOAP β€” an object-oriented interface for DOAP (Description of a Project) data 🫢


✨ SYNOPSIS ✨

okay so here's the vibe, literally just:

use feature 'say';
use RDF::DOAP;

my $url  = 'http://api.metacpan.org/source/DOY/Moose-2.0604/doap.rdf';
my $doap = 'RDF::DOAP'->from_url($url);
my $proj = $doap->project;

say $proj->name;       # "Moose"

say $_->name
   for @{ $proj->maintainer };

like. that's it. that's the whole flex. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

ngl bestie, it's a little sparsely documented right now. that's just the truth, no cap. πŸ™ˆ

the RDF::DOAP class itself is mostly a wrapper β€” it parses RDF and builds objects for you, which is the boring-but-necessary part. most of the interesting stuff lives in the "Bundled Classes" down below. so like, don't just stop reading here, the good part is further down, iykyk. πŸ‘‘

πŸŽ€ Constructors πŸŽ€

  • new(%attrs) β€” bestie do NOT use this. like, genuinely. you don't want to use this. periodt. πŸ’€
  • from_url($url) β€” parses the RDF sitting at the URL you hand it, and constructs an RDF::DOAP object out of it. chef's kiss. πŸ”₯
  • from_file($fh, $base) β€” parses a file handle or a file name, your call. you can pass a base URL along so relative URI references actually resolve properly. and if you skip the base? it just assumes http://localhost/ which is, and I quote, almost certainly wrong. so maybe pass it. 🫠
  • from_model($model) β€” reads DOAP out of an RDF::Trine::Model you already have lying around. reusing what you've got? very main character of you. ⭐

πŸ’œ Attributes πŸ’œ

  • projects β€” an arrayref, holding the list of software projects found in the input data. and heads up: this one cannot be provided in the constructor. it said what it said. πŸ™…β™€οΈ

🌈 Methods 🌈

  • project β€” if projects has only one project in it, boom, that's the one you get back. easy.

but if there's more than one? it tries to guess which project the input data was mostly trying to describe. so yeah, it's doing detective work. πŸ”

🧚 Bundled Classes 🧚

so inside every one of these classes, the attributes roughly match up with the properties defined for them in the DOAP schema. one tiny thing though β€” hyphens in property URIs become underscores in attribute names. that's the whole translation rule, don't overthink it. ✨

  • RDF::DOAP::Resource β€” correponds roughly to the rdfs:Resource class, excluding literals.
  • RDF::DOAP::Project β€” correponds to doap:Project.
  • RDF::DOAP::Repository β€” correponds to doap:Repository.
  • RDF::DOAP::Person β€” correponds to foaf:Person.
  • RDF::DOAP::Version β€” correponds to doap:Version.
  • RDF::DOAP::ChangeSet β€” correponds to dcs:ChangeSet.
  • RDF::DOAP::Change β€” correponds to dcs:Change.
  • RDF::DOAP::Issue β€” correponds to dbug:Issue.

😭 BUGS 😭

found a bug? bestie please tell someone, don't just suffer in silence. report them over at <https://github.com/kjetilk/p5-rdf-doap/issues> πŸ’–


🌟 SEE ALSO 🌟


πŸ‘‘ AUTHOR πŸ‘‘

Toby Inkster <tobyink@cpan.org>. Kjetil Kjernsmo <kjetilk@cpan.org>.

like, absolute legends, both of them. 🫢


This software is copyright (c) 2013 by Toby Inkster, 2017 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.


πŸ’€ 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.

okay so like, that's the scary part and I'm not softening it. no warranty, fr fr. it said what it said. πŸ™ˆ

and that's a wrap bestie!! this page was rendered by perl v5.34.0 on 2022-07-29 and honestly? iconic of it. go build something cute with it. πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from