in reply to Re^2: Mojo Template, passing dynamic index to array.
in thread Mojo Template, passing dynamic index to array.

I understood $number as loop var, loading it into a temporary $street var would lead to more code.

YMMV...

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

  • Comment on Re^3: Mojo Template, passing dynamic index to array.

Replies are listed 'Best First'.
Re^4: Mojo Template, passing dynamic index to array.
by marto (Cardinal) on Jul 16, 2021 at 16:56 UTC

    That's one way to look at it. Both are assumptions without OP providing proper context. I often see people pass large data structures to templates, only to never reference most of it.

      > I often see people pass large data structures to templates, only to never reference most of it.

      Is there really a memory impact? The "template" logic is not in a different process, right ?

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery

        Exactly. The only thing you're passing is a reference.