Templat...terator(3)

okay bestie, welcome to the Templat...terator(3) page from the User Contributed Perl Documentation crew β€” yes, the header truncates the name like that, and it's giving β€œmy terminal is a little dramatic” energy. The actual module is Template::Plugin::Iterator, and we're about to make iterators make sense, no cap. πŸ’…

🌸 NAME 🌸

Template::Plugin::Iterator β€” Plugin to create iterators (Template::Iterator). That's the whole name-section moment, and it ate. πŸ‘‘

✨ SYNOPSIS ✨

okay so the template vibes look like this β€” keep it exact, bestie:

[% USE iterator(list, args) %]

[% FOREACH item = iterator %]
   [% '<ul>' IF iterator.first %]
   <li>[% item %]
   [% '</ul>' IF iterator.last %]
[% END %]

πŸ’– DESCRIPTION πŸ’–

The iterator plugin provides a way to create a Template::Iterator object to iterate over a data set. An iterator is implicitly automatically by the FOREACH directive. This plugin allows the iterator to be explicitly created with a given name.

That's the whole plot: FOREACH is doing its automatic implicit thing, and this plugin is your main character move for naming an iterator explicitly. 🫢

πŸ‘‘ AUTHOR πŸ‘‘

Andy Wardley β€” <abw@wardley.org> and <http://wardley.org/>. iconic. πŸ’œ

  • Copyright (C) 1996-2022 Andy Wardley. All Rights Reserved.
  • This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

free-software slay, with the same terms as Perl itself. πŸŽ€

πŸ¦‹ SEE ALSO πŸ¦‹

  • Template::Plugin
  • Template::Iterator

go peek at those next, bestie β€” they're the supporting cast. πŸ¦‹


later bestie πŸ’… β€” source/version is perl v5.42.0, dated 2024-06-23, and the footer manual name is Templat...terator(3). stay iconic 🫢

πŸ“¦ where this page comes from