MooseX::Semantic::Role::WithRdfType - Role that for assigning a RDF type to a class
package My::Model::Person; use RDF::Trine::Namespace qw(foaf); with qw(MooseX::Semantic::Role::WithRdfType'); __PACKAGE__->rdf_type($foaf->Person); package main; print My::Model::Person->rdf_type;
A class that consumes this role has a class attribute rdf_type that can be used in exporting objects of this class to or creating objects from RDF data.
rdf_type
Class Attribute that stores one or more rdf:type URIs. The URIs are stored as an array of RDF::Trine::Resources and can be coerced from strings, URI objects and arrays thereof.
Konstantin Baierer (<kba@cpan.org>)
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perldoc perlartistic.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
To install MooseX::Semantic, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooseX::Semantic
CPAN shell
perl -MCPAN -e shell install MooseX::Semantic
For more information on module installation, please visit the detailed CPAN module installation guide.