Text::PDF::Array(3pm)

πŸ“¦
version 0.31 Β· 5 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

✨ 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