RDF::G...ectList(3pm)
π RDF::Generator::Void::Meta::Attribute::ObjectList π
okay bestie, welcome to RDF::G...ectList(3pm) β yes that's the manual name, the terminal did a little β¨abbreviationβ¨ thing, don't worry about it. It's part of the User Contributed Perl Documentation crew, and it's literally just a lil trait that makes your RDF object lists behave. Let's go π¦
β¨ NAME β¨
RDF::Generator::Void::Meta::Attribute::ObjectList β a trait for a list of RDF objects. that's it, that's the whole name, no notes π
πΈ SYNOPSIS πΈ
like, here's the vibe in actual code, copy it exactly, i'm not retyping it for you:
has _endpoints => ( traits => ['ObjectList'] );
has _titles => (
traits => ['ObjectList'],
isa => 'ArrayRef[RDF::Trine::Node::Literal]',
);
has resources => ( traits => ['ObjectList'] );
π DESCRIPTION π
so this module hands you a trait that manages a list of RDF resources β the kind you'd typically drop into an object position in an RDF triple. iykyk. π§
when you're declaring attributes, you can just throw traits => ['ObjectList'] in there all by itself, and it'll hook you up with an arrayref of strings plus the methods to:
- push to the array π«Ά
- list all the strings in the array β¨
- check if it's empty π
and those methods get made by prefixing add_, all_, and has_no_ onto your attribute name β respectively, in that order, no cap.
now, plot twist: if you start your attribute name with an underscore, the attribute itself will not be a method. but don't panic!! you can still pass the non-prefixed attribute name as an argument to the constructor, and you still get all the same methods as above. main character behavior, honestly. π
you may also pass an isa argument to the attribute. in that case you can set the arrayref to hold something that is not strings β exactly like the RDF::Trine::Node::Literal situation in the synopsis up there. iconic. π
π FURTHER DOCUMENTATION π
bestie if you want more, please see RDF::Generator::Void for further documentation. that's the mothership, go read it. π
π AUTHORS AND COPYRIGHT π
this module was prototyped by Konstantin Baierer and it's mostly his work. respect the architect. π
and for all the info about authors and copyright for this module, please see RDF::Generator::Void β they got the receipts over there. β
π quick sign-off from ur fave: this page came to you via perl v5.34.0, dated 2022-06-17. mwah. go write some triples. π
π¦ where this page comes from
- debian bookworm: librdf-generator-void-perl 0.16-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: librdf-generator-void-perl 0.16-4 Β· 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