Types::Attean(3pm)
okay so bestie, this is Types::Attean(3pm), from the User Contributed Perl Documentation manual, and it's literally here to make type constraints for Attean classes make sense. no cap. π
β¨
πΈ NAME πΈ
Types::Attean β type constraints for dealing with Attean classes. periodt. π
β¨ SYNOPSIS β¨
The synopsis is honestly just sitting there going TODO (not me...), and then it gives you this little example:
package IRI::Counter {
use Moo; # or Moose
use Types::Attean qw( AtteanIRI );
has iri => (
is => "ro",
isa => AtteanIRI,
required => 1,
);
sub count_uses_in_document { ... }
}
the way this is such a clean little Moo/Moose situation... π«Ά
π¦ DESCRIPTION π¦
So like, Types::Attean is a type constraint library that is suitable for use with Moo/Moose attributes, Kavorka sub signatures, and so forth. It builds on Types::URI. That's the whole vibe: type constraints, but make it Attean. π
π TYPES π
okay bestie, here's the cast of characters β every single one matters:
AtteanIRIβ a class type forAttean::IRI. It can coerce fromURI,IRI,URI::Namespace,RDF::Trine::Node::Resource,RDF::Trine::Namespace,XML::Namespaceand strings. Also β and this is the cute bonus β aScalarRefcan be coerced into adataURI. πAtteanBlankβ a role type forAttean::API::Blank.AtteanLiteralβ a role type forAttean::API::Literal.AtteanSubjectβ a role type for a term that can be used as a subject in a triple or quad (i.e.,Attean::API::BlankOrIRI).AtteanPredicateβ a role type for a term that can be used as a predicate in a triple or quad (i.e.,Attean::API::IRI).AtteanObjectβ a role type for a term that can be used as an object in a triple or quad (i.e.,Attean::API::Term).AtteanGraphβ a role type for a term that can be used as a graph in a quad (i.e.,Attean::API::BlankOrIRI).AtteanTripleβ a role type forAttean::API::Triple.AtteanQuadβ a role type forAttean::API::Quad.
π OTHER COERCIONS π
Oh and there's more: this library can also coerce from Attean::IRI to the Namespace type defined in URI::Namespace. so yes, it's giving cross-library flexibility, iykyk. π§β¨
that's the whole page, bestie β huge kisses from the docs brought to you by perl v5.40.0, dated 2025-01-26, and filed under Types::Attean(3pm). mwah πβ¨
π¦ where this page comes from
- debian trixie: libattean-perl 0.035-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libattean-perl 0.035-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libattean-perl 0.035-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms