Templa...coding(3pm)

πŸ“¦
version 0.10 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Tempate::Plugin::encoding(3pm) β€” aka the Template plugin that's literally just here to spill the tea about encoding πŸ’–

okay bestie, pull up a chair πŸŽ€ this is a page from the User Contributed Perl Documentation collection, and it's about a lil' plugin that does almost nothing and yet is lowkey iconic for it. iykyk. ✨


✨ NAME ✨

Tempate::Plugin::encoding β€” Template plugin to specify encoding

and yes, the NAME section really does say Tempate and not Template 🫢 i am simply reporting what's on the page, bestie, no cap, i do not make the rules πŸ’…

🌸 SYNOPSIS 🌸

[% USE encoding 'euc-jp' -%]
<?xml version="1.0" encoding="[% encoding %]"?>

look at her. two lines. serving exactly what she needs to serve. queen behaviour fr fr πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

Template::Plugin::encoding is a Template plugin whose whole entire job is to declare the encoding of template files. that's the vibe check it passes. 🌈

but here's the plot twist: this plugin doesn't actually do anything 😭 β€” nope, not a single thing, she's just standing there looking pretty. the real main character is Template::Provider::Encoding, which scans the usage of this module to find the encoding of templates. so like, the plugin is the little note you leave on the fridge and the Provider is the parent who actually reads it. it's giving delegation. it's giving teamwork. i'm obsessed. πŸ’–

and as a bonus 🎁 (we love a bonus), you can use the encoding variable in the template itself to specify file encoding β€” which might come in handy for an XML or HTML meta tag. ✨ so yeah, mostly decorative, occasionally useful, always serving looks. πŸ’…


πŸ’œ AUTHOR πŸ’œ

Tatsuhiko Miyagawa <miyagawa@bulknews.net> β€” say thank you to the icon who wrote this 🫢 πŸ‘‘

and the legal bit, in full, no skipping: this library is free software β€” you can redistribute it and/or modify it under the same terms as Perl itself. πŸ“œ periodt.


πŸŽ€ SEE ALSO πŸŽ€

  • Template::Provider::Encoding β€” the one who actually does the work, the Provider to this plugin's little note πŸ¦‹

and that's the whole page, bestie, we ate and left no crumbs ⭐ this gem was documented by way of perl v5.34.0, dated 2022-06-17, and lives at Templa...coding(3pm) in the manual pages πŸ’– bye ily, go declare your encodings πŸ“πŸ§š

πŸ“¦ where this page comes from