Templat...n::View(3)

πŸ’– NAME πŸ’–

Template::Plugin::View β€” a lil plugin that creates views, aka Template::View objects πŸŽ€ (iykyk)

🌸 SYNOPSIS 🌸

okay so here's the whole vibe, copy this exactly bestie:

    [% USE view(
            prefix = 'splash/'          # template prefix/suffix
            suffix = '.tt2'
            bgcol  = '#ffffff'          # and any other variables you
            style  = 'Fancy HTML'       # care to define as view metadata,
            items  = [ foo, bar.baz ]   # including complex data and
            foo    = bar ? baz : x.y.z  # expressions
    %]

    [% view.title %]                    # access view metadata

    [% view.header(title = 'Foo!') %]   # view "methods" process blocks or
    [% view.footer %]                   # templates with prefix/suffix added

the way this slays β€” you're setting up your prefix/suffix and literally any other variables you wanna define as view metadata (complex data and expressions included, no cap) ✨ then view.title gets you that metadata, and the "methods" like view.header(...) / view.footer go process blocks or templates with the prefix/suffix added πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

so this plugin module creates Template::View objects. iconic behaviour, truly πŸ‘‘

lowkey important: views are an experimental feature and are subject to change in the near future ⚠️ so don't get too attached to the exact shape of things, bestie 😭

in the mean time, please consult Template::View for further info 🫢

🌈 AUTHOR 🌈

Andy Wardley <abw@wardley.org> <http://wardley.org/> β€” a whole legend πŸ’œ

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. fr fr πŸ“

🧚 SEE ALSO 🧚

  • Template::Plugin
  • Template::View
  • Template::Manual::Views

and that's a wrap, bestie πŸ’– this page came to you via perl v5.42.0, dated 2024-06-23 β€” go forth and build cute views, periodt πŸŒΈπŸ¦‹βœ¨

πŸ“¦ where this page comes from