NetSDS::Template(3pm)
π 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::ProHTML::Template
go read those too, bestie, they're the ancestors iykyk π
β TODO β
- 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 πβ¨π¦
π¦ where this page comes from
- debian bookworm: libnetsds-perl 1.301-4 Β· GPL-2.0-or-later
- debian trixie: libnetsds-perl 1.301-4 Β· GPL-2.0-or-later
- ubuntu jammy: libnetsds-perl 1.301-4 Β· GPL-2.0-or-later
- ubuntu noble: libnetsds-perl 1.301-4 Β· GPL-2.0-or-later
- ubuntu resolute: libnetsds-perl 1.301-4 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms