RDF::Generator::Void::Meta::Attribute::ObjectList(3pm)

RDF::Generator::Void::Meta::Attribute::ObjectList3pm

Trait for list of rdf objects

Usage

 has _endpoints => ( traits => ['ObjectList'] );
 has _titles => (
                                  traits => ['ObjectList'],
                                  isa      => 'ArrayRef[RDF::Trine::Node::Literal]',
                                 );
 has resources => ( traits => ['ObjectList'] );

Description

This module gives you a trait to manage a list of RDF resources typically used in an object position in an RDF triple. When declaring attributes, you may use "traits =" ['ObjectList']> alone in which case it'll give you a arrayref of strings and the methods to push to the array, list all strings in the array, and to check if it is empty. These are created by prefixing "add_", "all_" and "has_no_" to your attribute name, respectively.

If you have an underscore in the beginning, the attribute will not itself be a method, but you can still use the non-prefixed attribute name as argument to the constructor, and you will have the same methods as above.

You may also give a "isa" argument to the attribute. In that case, you may set the arrayref to contain something other than strings, like in the example above.

Further documentation

Please see RDF::Generator::Void for further documentation.

Releases

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

  1. 8
  2. 9
  3. 10
  4. 11
  5. 12
  6. 13

From librdf-generator-void-perl 0.16-5 in Debian 13 (Trixie). Parsed by carta from the page's man source.