Templa...::POSIX(3pm)

πŸ“¦
version 0.05 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

✨ Template::Plugin::POSIX πŸ’…

okay bestie, welcome to the Template::Plugin::POSIX page β€” it's a TT2 plugin that imports POSIX functions, and yes it lives in the User Contributed Perl Documentation corner of the perl manual, we love that for it 🫢


🌸 NAME 🌸

Template::Plugin::POSIX β€” the TT2 plugin that lets you import POSIX functions, no cap πŸ’–


πŸŽ€ VERSION πŸŽ€

This doc describes Template::Plugin::POSIX 0.05, which dropped on 12 March, 2007. vintage but iconic, fr fr ⭐


✨ SYNOPSIS ✨

  [% USE POSIX %]

  [% POSIX.log(100) %]
  [% POSIX.rand(1) %]
  [% POSIX.exp(2) %]
  [% POSIX.sprintf("%.0f", 3.5) %]
  [% POSIX.pow(2, 3) %]
  [% POSIX.ceil(3.8) %]
  [% POSIX.floor(3.8) %]
  [% POSIX.sin(3.14) %]
  [% POSIX.cos(0) %]

literally just USE POSIX and the whole function buffet opens up 🌈


πŸ’œ DESCRIPTION πŸ’œ

So like β€” as a TT programmer, the author found the Template Toolkit's presentation language kinda inflexible, because the vocabulary was very limited 😭. So they wrote this little plugin to open a whole window from the template file into the full richness of most POSIX functions, which lowkey turns the Template language into a "programming language" in a much more serious sense. main character energy tbh πŸ‘‘

Please keep in mind β€” and this is the important part, don't skip it β€” they just used AUTOLOAD, eval, and Data::Dumper to do the magic here πŸͺ„

If you're looking for even more functions, they suggest you take a look at the Template::Plugin::Perl module, which exports the excellent POSIX repertoire. iykyk πŸ’…


πŸ¦‹ METHODS πŸ¦‹

  • new β€” the constructor, called by the TT2 template system 🍼
  • throw β€” the TT2 exception handling procedure 🚨

πŸ’€ TODO πŸ’€

  • Add more unit tests. (yes bestie, that's the whole list πŸ™ˆ)

🌟 SOURCE CONTROL 🌟

You can always get the latest version of the source code from the following Subversion repository:

<http://svn.openfoundry.org/ttposix>

There is anonymous access to all of it 🫢

If you'd like a commit bit, please let them know :) ✨


πŸ‘‘ AUTHOR πŸ‘‘

Agent Zhang, <agentzh@gmail.com> πŸ’Œ


Copyright (c) 2005, 2006, 2007 by Agent Zhang. All rights reserved. πŸ’–

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. periodt 🌸


🌈 SEE ALSO 🌈

  • Template
  • Template::Plugin::Perl
  • Data::Dumper

and that's the whole vibe check bestie β€” this page is from perl v5.32.0, dated 2021-01-06, and you absolutely ate for reading all the way to the end πŸ’…πŸŽ€πŸ’œ

πŸ“¦ where this page comes from