Types::Namespace(3pm)
β¨ NAME β¨
Types::Namespace β type constraints for dealing with namespaces, bestie π
It's a Perl module, manual page Types::Namespace(3pm), and it's literally here to make your namespace-typed attributes not a whole situation.
π SYNOPSIS π
package Namespace::Counter {
use Moo; # or Moose
use Types::Namespace qw( Namespace );
has ns => (
is => "ro",
isa => Namespace,
required => 1,
);
sub count_uses_in_document { ... }
}
okay that's the whole vibe right there. you just use it, you ask for Namespace, you slap it on an attribute, done. slay π«Ά
π DESCRIPTION π
So Types::Namespace is a type constraint library β and the way it's built, it's perfect for Moo/Moose attributes, Kavorka sub signatures, and honestly so forth, whatever else you got going on. It's built on top of Types::URI, so it's inheriting all that good good. π
π¦ TYPES π¦
"Namespace"β a class type forURI::Namespace. π
Can coerce from URI, IRI, Path::Tiny, Attean::IRI, RDF::Trine::Namespace, RDF::Trine::Node::Resource and strings. yes, strings too, we're generous like that. β¨
"NamespaceMap"β a class type forURI::NamespaceMap. πΊοΈ
Can coerce from a hashref of prefix => URI pairs and from RDF::Trine::NamespaceMap. note that hashref shape: prefix => URI pairs, fr fr. π
"Uri","Iri"β these namespaces are re-exported fromTypes::URI, but with an additional coercion from the"Namespace"type. so they're the same icons, just with a lil extra glow-up. πΈ
π FURTHER DETAILS π
See URI::NamespaceMap for further details about authors, license, etc. β like, all the ~paperwork~ lives over there, go peek. π
and that's the page!! this one shipped with perl v5.38.2 and it's dated 2024-08-03 β go forth and type-check your namespaces, bestie, you're gonna ate π β¨π¦
π¦ where this page comes from
- debian trixie: liburi-namespacemap-perl 1.12-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: liburi-namespacemap-perl 1.12-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: liburi-namespacemap-perl 1.12-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms