RDF::SN(3pm)
π RDF::SN π
okay bestie, so this is a Perl manual page β RDF::SN(3pm), from the User Contributed Perl Documentation collection. buckle up, it's short but it slaps. π
β¨ NAME β¨
RDF::SN β short names for URIs, with prefixes straight from prefix.cc π¦
πΈ SYNOPSIS πΈ
use RDF::SN;
$abbrev = RDF::SN->new('20230619');
$abbrev->qname('http://www.w3.org/2000/01/rdf-schema#type'); # rdfs:type
like. look at that. one line and your URI is tiny. no cap. π
π DESCRIPTION π
okay so this module is literally here to help you abbreviate URIs into short names β aka qualified names, which is the fancy way of saying it. and the way that it's the counterpart of RDF::NS? iconic. π«Ά
π§ new( [ $ns ] )
creates a lookup hash from a mapping hash of namespace URIs to prefixes (that's the RDF::NS situation). and here's the tea on which prefix wins:
- if multiple prefixes exist, the shortest one gets used π
- if multiple prefixes with the same length exist, the first in alphabetical order gets used π
π¦ qname( $uri )
returns a prefix and a local name if the URI can be abbreviated with the given namespaces:
- in list context, you get them as a list β¨
- in scalar context, they come concatenated by
":"π«
periodt. that's the whole function. π
π COPYRIGHT AND LICENSE π
this software is copyright (c) 2013- by Jakob VoΓ. π
it's free software, bestie β you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. go off. π
ngl this whole page is short and sweet, but every single bit of it ate. πβ¨
and that's a wrap, my love β this page was built with perl v5.38.2 and dated 2024-01-21. mwah. πππ¦πΈ
π¦ where this page comes from
- debian trixie: librdf-ns-perl 20230619-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: librdf-ns-perl 20230619-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: librdf-ns-perl 20230619-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms