RDF::NS::Curated(3pm)
π RDF::NS::Curated π (that's the manual page for RDF::NS::Curated(3pm), from the User Contributed Perl Documentation besties)
okay so picture this: you're out here writing RDF code and you need your prefixes to not be a mess. That's literally what this is. A curated little bestie for your URIs. Let's get into it π
β¨ NAME β¨
RDF::NS::Curated β a curated set of RDF prefixes π
π¦ SYNOPSIS π¦
my $ns = RDF::NS::Curated->new;
print $ns->uri('foaf'); # prints http://xmlns.com/foaf/0.1/
print $ns->prefix('http://schema.org/'); # prints schema
like, that's it. that's the whole vibe. π«Ά
πΈ DESCRIPTION πΈ
This contains a list of 62 prefix and URI pairs that are commonly used in RDF. The intention is that prefixes in this list can be safely used in code that has a long lifetime. The list has been derived mostly from W3C standards documents, but also some popularity lists. See the source code of this package for the full list. π
It is intended to be used with e.g. URI::NamespaceMap. no cap.
π§ Methods π§
newβ Constructor. Takes no arguments. Literally none. She doesn't want them. πuri($prefix)β This will return the URI (as a plain string) of the supplied prefix, orundefif it is not registered. so if it's not in the club, you getundef, sorry bestie πprefix($uri)β This will return the prefix corresponding to the supplied URI string, orundefif it is not registered. same energy, other direction β¨qname($uri)β This will return the qualified name corresponding to the supplied URI string, orundefif it is not registered. In scalar context, it will return the prefix and local name with a colon, and in list context, a two-element array containing prefix and local name.
For example http://purl.org/dc/terms/name will return dc:name in scalar context and ('dc', 'name') in list context. the way she adapts to context?? main character energy fr fr π
allβ This will return a hashref with all prefix and URI pairs. the whole roster. everyone. π
π BUGS π
Please report any bugs to <https://github.com/perlrdf/p5-rdf-ns-curated/issues>. don't be shy, they wanna know π
π SEE ALSO π
RDF::NS, XML::CommonNS, RDF::Prefixes. the whole friend group π«Ά
β¨ AUTHOR β¨
Kjetil Kjernsmo <kjetilk@cpan.org>.
π CONTRIBUTORS π
Harald JΓΆrg
π COPYRIGHT AND LICENCE π
This software is copyright (c) 2015, 2017, 2018, 2023 by Kjetil Kjernsmo.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, legally speaking π
π¨ 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.
like β no promises, bestie. that's the deal. π
and that's a wrap! this page is from perl v5.38.2, dated 2024-01-21, and it's the RDF::NS::Curated(3pm) manual. go forth and prefix responsibly πβ¨πΈ
π¦ where this page comes from
- debian trixie: librdf-ns-curated-perl 1.006-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: librdf-ns-curated-perl 1.006-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: librdf-ns-curated-perl 1.006-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms