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

Web::ID::Util - utility functions used in Web-ID

Author

       Toby Inkster <tobyink@cpan.org>.

Bugs

       I don't wanna hear about them unless they cause knock-on bugs for Web::ID itself.

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.

       Here is a very brief summary. By default, they're all exported to your namespace. (This module uses
       Exporter::Tiny so you get pretty good control over what gets exported.)

       "true" - constant for true
       "false" - constant for false
       "read_only" - constant for string 'ro' (nice for Moose/Mouse)
       "read_write" - constant for string 'rw' (nice for Moose/Mouse)
       "get_trine_model($url)" - fetches a URL and parses RDF into an RDF::Trine::Model
       "u($curie)" - expands a CURIE, returning an RDF::Trine::Node::Resource
       "uu($curie)" - as per "u($curie)", but returns string
       "u()" - called with no CURIE, returns the RDF::Trine::NamespaceMap used to map CURIEs to URIs
       "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.
           Supported options are "fallback" which provides a fallback node which will be used when $node is non-
           literal;  and  "fallback_type" either 'dec' or 'hex' which is used when parsing the fallback node, or
           if $node is a plain literal. (The actual datatype of the fallback  node  is  ignored  for  hysterical
           raisins.)

       Additionally,  any function from List::MoreUtils can be exported by request, except "true" and "false" as
       they conflict with the constants above.

         use Web::ID::Utils qw(:default uniq);

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.32.1                                       2021-09-11                                 Web::ID::Util(3pm)

Name

       Web::ID::Util - utility functions used in Web-ID

See Also

       Exporter::Tiny, Web::ID, Acme::24.

See Also