NetSDS::Template(3pm)

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

πŸ’– NetSDS::Template(3pm) πŸ’–

okay so bestie, welcome to the NetSDS::Template page β€” it's a 3pm manual, filed under User Contributed Perl Documentation, and it's literally the NetSDS template engine. sit down, grab a strawberry πŸ“, let's get into it.


✨ NAME ✨

NetSDS::Template β€” the NetSDS template engine, no cap πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

use NetSDS::Template;

that's it. that's the whole synopsis. iconic behavior honestly πŸ‘‘


🌸 DESCRIPTION 🌸

so the NetSDS::Template class hands developers the ability to create template based web applications. that's the whole vibe. you bring the templates, it does the templating. periodt. ✨


πŸ‘‘ CLASS API πŸ‘‘

new([%params]) β€” class constructor

this constructor loads template files and parses them. like, it does the whole setup for you before you even ask. 🫢

my $tpl = NetSDS::Template->new(
            dir => '/etc/NetSDS/templates',
            esc => 'URL',
            include_path => '/mnt/floppy/templates',
    );

render($tmpl_name, %params) β€” render document by template and paramters

this method prepares a set of parameters and applies them to the given template. what you get back is a ready for output document after processing. chef's kiss, honestly. 😭

Example:

# Simple template rendering with scalar parameters
my $str = $tmp->render('main', title => 'Main Page');

# Rendering template with array parameters
my $str2 = $tmp->render('list', title => 'Statistics', users => \@users_list);

🧚 EXAMPLES 🧚

None 😭

not one. zero. the examples section said "None" and meant it. we move. πŸ’€


πŸ’€ BUGS πŸ’€

Unknown yet πŸ™ˆ

literally unknown. nobody's found any yet. lowkey suspicious but we're not gonna say anything.


🌈 SEE ALSO 🌈

  • HTML::Template::Pro
  • HTML::Template

go read those too, bestie, they're the ancestors iykyk πŸ’œ


⭐ TODO ⭐

  1. Add i18n support to process multilingual templates.

just the one thing on the list. multilingual templates, coming never-ish. we'll see. πŸŽ€


πŸ’œ AUTHOR πŸ’œ

Michael Bochkaryov <misha@rattler.kiev.ua> β€” the main character who wrote this 🫢


πŸŽ€ THANKS πŸŽ€

Igor Vlasenko (http://search.cpan.org/~viy/) for HTML::Template::Pro

giving credit where credit is due, as one should πŸ’…


πŸ“œ LICENSE πŸ“œ

Copyright (C) 2008-2009 Net Style Ltd.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


okay and for the lil sign-off: this page is from perl v5.32.1, dated 2021-12-26, and it lives under the name NetSDS::Template(3pm). that's the whole page bestie, slay, go build something cute with it πŸ’–βœ¨πŸ¦‹