RDF::DOAP(3pm)
π 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 anRDF::DOAPobject 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 assumeshttp://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β ifprojectshas 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 therdfs:Resourceclass, excluding literals.RDF::DOAP::Projectβ correponds todoap:Project.RDF::DOAP::Repositoryβ correponds todoap:Repository.RDF::DOAP::Personβ correponds tofoaf:Person.RDF::DOAP::Versionβ correponds todoap:Version.RDF::DOAP::ChangeSetβ correponds todcs:ChangeSet.RDF::DOAP::Changeβ correponds todcs:Change.RDF::DOAP::Issueβ correponds todbug: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 π
- Edd Dumbill's series of articles on DOAP's design: part 1 <http://www.ibm.com/developerworks/xml/library/x-osproj/>, part 2 <http://www.ibm.com/developerworks/xml/library/x-osproj2/>, part 3 <http://www.ibm.com/developerworks/xml/library/x-osproj4/> and part 4 <http://www.ibm.com/developerworks/xml/library/x-osproj3/>
- The DOAP Schema <http://usefulinc.com/ns/doap#>.
- The DOAP Change Sets Schema <http://ontologi.es/doap-changeset#>.
- The DOAP Bugs Schema <http://ontologi.es/doap-bugs#>.
π AUTHOR π
Toby Inkster <tobyink@cpan.org>. Kjetil Kjernsmo <kjetilk@cpan.org>.
like, absolute legends, both of them. π«Ά
π COPYRIGHT AND LICENCE π
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
- debian bookworm: librdf-doap-perl 0.105-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: librdf-doap-perl 0.105-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: librdf-doap-perl 0.105-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: librdf-doap-perl 0.105-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms