RDF::DOAP(3pm)

RDF::DOAP3pm

An object-oriented interface for doap (description of a project) data

Usage

   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 };

Overview

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".

Constructors

"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.

"from_model($model)"

Read DOAP from an existing RDF::Trine::Model.

Attributes

"projects"

An arrayref; the list of software projects found in the input data. This cannot be provided in the constructor.

Methods

"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.

Bundled Classes

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.

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.

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.

Releases

6 releases since Debian 8 (Jessie); the text changed 3 times.

  1. 8–9
  2. 10
  3. 11
  4. 12–13

Bugs

Please report any bugs to <https://github.com/kjetilk/p5-rdf-doap/issues>.

Author

Toby Inkster <[email protected]>. Kjetil Kjernsmo <[email protected]>.

From librdf-doap-perl 0.105-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.