logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Author

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

Bugs

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

Description

       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.

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

perl v5.34.0                                       2022-07-29                                     RDF::DOAP(3pm)

Name

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

See Also

Synopsis

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

See Also