PDF::F...::Loop(3pm)

πŸ“¦
version 0.34 Β· 2 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– PDF::F...::Loop β€” the manual, but make it make sense

okay bestie so this is PDF::F...::Loop(3pm), a page from the User Contributed Perl Documentation collection, and it's literally just a looping construct for PDF::FromHTML::Template. Think "repeat this bit of your template for every item in a list" and you've got the whole vibe. It's giving for-each energy, no cap. πŸŒ€βœ¨


🌸 NAME 🌸

PDF::FromHTML::Template::Container::Loop β€” bestie, it provides a looping construct. That's it, that's the job. πŸŽ€


πŸ¦‹ NODE NAME πŸ¦‹

The node name is LOOP. That's the name you use when you write it in your template. Periodt. πŸ’…


πŸ‘‘ INHERITANCE πŸ‘‘

This one inherits from PDF::FromHTML::Template::Container. So it's a Container girlie at heart β€” it's got the whole family tree going on. 🌈


✨ ATTRIBUTES ✨

  • NAME β€” the name of a parameter that points to an array of hashes. Yep, an array of hashes, the classic Perl little treat. πŸ“

🧚 CHILDREN 🧚

None. This container does not have children nodes. It's a childless icon, honestly. 😭


πŸ’œ AFFECTS πŸ’œ

Nothing. Zero. Nada. It's not out here changing the state of the world, it's just looping. Lowkey humble of it. πŸ™ˆ


πŸ”₯ DEPENDENCIES πŸ”₯

  • FOOTER β€” this one indicates where to pagebreak. So yeah, the loop leans on FOOTER for that. πŸ“„

πŸ’… USAGE πŸ’…

okay so here's literally how you write it, copy this vibe:

<loop name="LOOPY">
  ... Children here ...
</loop>

The children tags will have access to the values specified in LOOPY, as well as the parameters specified outside. So like β€” inner tags get the loop's own values and everything from the outside scope. Both. At the same time. Main character behavior. 🌟

ngl, this is the whole point of the thing β€” scope stacking. You get your loop values plus your outer parameters, all accessible from inside. 🫢

🌸 AUTHOR 🌸

Rob Kinyon (rkinyon@columbus.rr.com). Thank you Rob for your service, king. πŸ‘‘


⭐ SEE ALSO ⭐

  • HTML::Template
  • FOOTER

aaaand that's the whole page bestie!! πŸ’– this was perl v5.38.2, dated 2024-07-28, and it's the PDF::F...::Loop(3pm) page from the Perl docs. go forth and loop responsibly, you ate this πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from