RDF::DOAP - an object-oriented interface for DOAP (Description of a Project) data
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 };
A little sparsely documented right now.
The RDF::DOAP class itself is mostly a wrapper for parsing RDF and building objects. Most of the interesting stuff is in the "Bundled Classes".
new(%attrs)
You don't want to use this.
from_url($url)
Parse the RDF at the given URL and construct an RDF::DOAP object.
from_file($fh, $base)
Parse a file handle or file name. A base URL may be provided for resolving relative URI references; if omitted the base is assumed to be http://localhost/ which is almost certainly wrong.
http://localhost/
from_model($model)
Read DOAP from an existing RDF::Trine::Model.
projects
An arrayref; the list of software projects found in the input data. This cannot be provided in the constructor.
project
If projects contains only one project, returns it.
Otherwise, tries to guess which of the projects the input data was mostly trying to describe.
Within each of these classes, the attributes correspond roughly to the properties defined for them in the DOAP schema; however hyphens in property URIs become underscores in attribute names.
Correponds roughly to the rdfs:Resource class, excluding literals.
Correponds to doap:Project.
Correponds to doap:Repository.
Correponds to foaf:Person.
Correponds to doap:Version.
Correponds to dcs:ChangeSet.
Correponds to dcs:Change.
Correponds to dbug:Issue.
Please report any bugs to https://github.com/kjetilk/p5-rdf-doap/issues.
Edd Dumbill's series of articles on DOAP's design: part 1, part 2, part 3 and part 4
The DOAP Schema.
The DOAP Change Sets Schema.
The DOAP Bugs Schema.
Toby Inkster <tobyink@cpan.org>. Kjetil Kjernsmo <kjetilk@cpan.org>.
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.
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.
To install RDF::DOAP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RDF::DOAP
CPAN shell
perl -MCPAN -e shell install RDF::DOAP
For more information on module installation, please visit the detailed CPAN module installation guide.