.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "RDF::Helper::Properties 3pm" .TH RDF::Helper::Properties 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME RDF::Helper::Properties \- Module that provides shortcuts to retrieve certain information .SH VERSION .IX Header "VERSION" Version 0.22 .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& my $helper = RDF::Helper::Properties\->new($model); \& print $helper\->title($node); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" .SS Constructor .IX Subsection "Constructor" .ie n .IP """new(model => $model, %attributes)""" 4 .el .IP "\f(CWnew(model => $model, %attributes)\fR" 4 .IX Item "new(model => $model, %attributes)" Moose-style constructor. .SS Attributes .IX Subsection "Attributes" .ie n .IP """model""" 4 .el .IP \f(CWmodel\fR 4 .IX Item "model" The RDF::Trine::Model which data will be extracted from. The only attribute which the constructor requires. .ie n .IP """page_properties""" 4 .el .IP \f(CWpage_properties\fR 4 .IX Item "page_properties" An arrayref of RDF::Trine::Node::Resource objects, each of which are taken to mean "something a bit like foaf:homepage". There is a sensible default. .ie n .IP """title_properties""" 4 .el .IP \f(CWtitle_properties\fR 4 .IX Item "title_properties" An arrayref of RDF::Trine::Node::Resource objects, each of which are taken to mean "something a bit like foaf:name". There is a sensible default. .ie n .IP """cache""" 4 .el .IP \f(CWcache\fR 4 .IX Item "cache" A hashref for caching data into, or a blessed object which supports \f(CW\*(C`get\*(C'\fR and \f(CW\*(C`set\*(C'\fR methods compatible with CHI and Cache::Cache. If you do not supply a cache, then a hashref will be used by default. .SS Methods .IX Subsection "Methods" .ie n .IP page($node) 4 .el .IP \f(CWpage($node)\fR 4 .IX Item "page($node)" A suitable page to redirect to, based on foaf:page or foaf:homepage. .ie n .IP title($node) 4 .el .IP \f(CWtitle($node)\fR 4 .IX Item "title($node)" A suitable title for the document will be returned, based on document contents. .Sp Called in list context, returns a ($value, \f(CW$lang\fR, \f(CW$datatype\fR) tuple. .ie n .IP description($node) 4 .el .IP \f(CWdescription($node)\fR 4 .IX Item "description($node)" A suitable description for the document will be returned, based on document contents .ie n .IP html_node_value($node) 4 .el .IP \f(CWhtml_node_value($node)\fR 4 .IX Item "html_node_value($node)" Formats the nodes for HTML output. .SH AUTHOR .IX Header "AUTHOR" Most of the code was written by Gregory Todd Williams \f(CW\*(C`\*(C'\fR for RDF::LinkedData::Apache, but refactored into this class for use by other modules by Kjetil Kjernsmo, \f(CW\*(C`\*(C'\fR, then refactored again by Toby Inkster, \&\f(CW\*(C`\*(C'\fR. .SH "COPYRIGHT & LICENSE" .IX Header "COPYRIGHT & LICENSE" Copyright 2010 Gregory Todd Williams and ABC Startsiden AS. .PP Copyright 2012 Toby Inkster. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.