RDF::SN(3pm)

πŸ“¦
this version Β· 6 versions
, in debian trixie, ubuntu noble, ubuntu questing

πŸ’– 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. πŸ’–


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