.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 "Web::ID::Util 3pm" .TH Web::ID::Util 3pm "2021-09-11" "perl v5.32.1" "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" Web::ID::Util \- utility functions used in Web\-ID .SH "DESCRIPTION" .IX Header "DESCRIPTION" These are utility functions which I found useful building Web-ID. Many of them may also be useful creating the kind of apps that Web-ID is used to authenticate for. .PP Here is a very brief summary. By \fBdefault\fR, they're \fBall\fR exported to your namespace. (This module uses Exporter::Tiny so you get pretty good control over what gets exported.) .ie n .IP """true"" \- constant for true" 4 .el .IP "\f(CWtrue\fR \- constant for true" 4 .IX Item "true - constant for true" .PD 0 .ie n .IP """false"" \- constant for false" 4 .el .IP "\f(CWfalse\fR \- constant for false" 4 .IX Item "false - constant for false" .ie n .IP """read_only"" \- constant for string 'ro' (nice for Moose/Mouse)" 4 .el .IP "\f(CWread_only\fR \- constant for string 'ro' (nice for Moose/Mouse)" 4 .IX Item "read_only - constant for string 'ro' (nice for Moose/Mouse)" .ie n .IP """read_write"" \- constant for string 'rw' (nice for Moose/Mouse)" 4 .el .IP "\f(CWread_write\fR \- constant for string 'rw' (nice for Moose/Mouse)" 4 .IX Item "read_write - constant for string 'rw' (nice for Moose/Mouse)" .ie n .IP """get_trine_model($url)"" \- fetches a \s-1URL\s0 and parses \s-1RDF\s0 into an RDF::Trine::Model" 4 .el .IP "\f(CWget_trine_model($url)\fR \- fetches a \s-1URL\s0 and parses \s-1RDF\s0 into an RDF::Trine::Model" 4 .IX Item "get_trine_model($url) - fetches a URL and parses RDF into an RDF::Trine::Model" .ie n .IP """u($curie)"" \- expands a \s-1CURIE,\s0 returning an RDF::Trine::Node::Resource" 4 .el .IP "\f(CWu($curie)\fR \- expands a \s-1CURIE,\s0 returning an RDF::Trine::Node::Resource" 4 .IX Item "u($curie) - expands a CURIE, returning an RDF::Trine::Node::Resource" .ie n .IP """uu($curie)"" \- as per ""u($curie)"", but returns string" 4 .el .IP "\f(CWuu($curie)\fR \- as per \f(CWu($curie)\fR, but returns string" 4 .IX Item "uu($curie) - as per u($curie), but returns string" .ie n .IP """u()"" \- called with no \s-1CURIE,\s0 returns the RDF::Trine::NamespaceMap used to map CURIEs to URIs" 4 .el .IP "\f(CWu()\fR \- called with no \s-1CURIE,\s0 returns the RDF::Trine::NamespaceMap used to map CURIEs to URIs" 4 .IX Item "u() - called with no CURIE, returns the RDF::Trine::NamespaceMap used to map CURIEs to URIs" .ie n .IP """make_bigint_from_node($node, %options)"" \- makes a Math::BigInt object from a numeric RDF::Trine::Node::Literal. Supports most datatypes you'd care about, including hexadecimally ones." 4 .el .IP "\f(CWmake_bigint_from_node($node, %options)\fR \- makes a Math::BigInt object from a numeric RDF::Trine::Node::Literal. Supports most datatypes you'd care about, including hexadecimally ones." 4 .IX Item "make_bigint_from_node($node, %options) - makes a Math::BigInt object from a numeric RDF::Trine::Node::Literal. Supports most datatypes you'd care about, including hexadecimally ones." .PD Supported options are \f(CW\*(C`fallback\*(C'\fR which provides a fallback node which will be used when \f(CW$node\fR is non-literal; and \f(CW\*(C`fallback_type\*(C'\fR either 'dec' or 'hex' which is used when parsing the fallback node, or if \f(CW$node\fR is a plain literal. (The actual datatype of the fallback node is ignored for hysterical raisins.) .PP Additionally, any function from List::MoreUtils can be exported by request, except \f(CW\*(C`true\*(C'\fR and \f(CW\*(C`false\*(C'\fR as they conflict with the constants above. .PP .Vb 1 \& use Web::ID::Utils qw(:default uniq); .Ve .SH "BUGS" .IX Header "BUGS" I don't wanna hear about them unless they cause knock-on bugs for Web::ID itself. .SH "SEE ALSO" .IX Header "SEE ALSO" Exporter::Tiny, Web::ID, Acme::24. .SH "AUTHOR" .IX Header "AUTHOR" Toby Inkster . .SH "COPYRIGHT AND LICENCE" .IX Header "COPYRIGHT AND LICENCE" This software is copyright (c) 2012 by Toby Inkster. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. .SH "DISCLAIMER OF WARRANTIES" .IX Header "DISCLAIMER OF WARRANTIES" \&\s-1THIS PACKAGE IS PROVIDED \*(L"AS IS\*(R" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.\s0