Text::PDF::Array(3pm)
β¨ Text::PDF::Array β¨
okay bestie, gather round π this is Text::PDF::Array β a lil module from the User Contributed Perl Documentation, and it corresponds to a PDF array. that's the whole vibe. it inherits from PDF::Objind, so all that parent-class goodness is just there, handed to you, no cap. π
π INSTANCE VARIABLES π
okay so plot twist, and this one's important: this object is not an array β it's an associative array that holds the array of elements inside it. so there are special instance variables just for an array object, and they begin with a space. that's not a typo, that's the whole design. π
varβ contains the actual array of elements. that's it, that's the one. the realest one. π
π¦ METHODS π¦
PDF::Array->new($parent, @vals)
creates an array, with the given storage parent, and an optional list of values to initialise the array with. give it a parent, toss it some values if you feel like it, boom, array. β¨
$a->outobjdeep($fh, $pdf)
outputs an array as a PDF array to the given filehandle. like, it takes the array and writes it out properly. your $fh and your $pdf come along for the ride. π«
$a->removeobj($elem)
removes all occurrences of an element from an array. not one. not the first. all of them. every single one. periodt. π
$a->elementsof
returns a list of all the elements in the array. and listen β notice that this is not the array itself, it's the elements in the array. very different things, bestie, don't get it twisted. π«Ά
$a->add_elements
appends the given elements to the array. and here's the lil rule: an element is only added if it is defined. undef? not invited. not on the list. π«
$a->val
returns the value of the array β which is a reference to the actual array containing the elements. so like, the actual array. the one. π―
$d->copy($inpdf, $res, $unique, $outpdf, %opts)
copies an object. that's the whole thing. for the details, go see Text::PDF::Objind::Copy(). iykyk. π
fr fr, that's the whole page. nothing skipped, nothing spilled. π
okay that's a wrap, bestie β this was Text::PDF::Array(3pm) from perl v5.36.0, dated 2022-10-22, ate and left no crumbs πππ
π¦ where this page comes from
- ubuntu noble: libtext-pdf-perl 0.31-3 Β· Artistic-2.0
- ubuntu resolute: libtext-pdf-perl 0.31-3 Β· Artistic-2.0
- ubuntu stonking: libtext-pdf-perl 0.31-3 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms