HTML::E...erpolate(3)
π NAME π
HTML::Entities::Interpolate β call HTML::Entities::encode_entities, via a hash, within a string
okay so bestie, this is HTML::E...erpolate(3) and it's literally the cutest little shortcut. you've got a hash, you drop it inside a string, and boom β your entities are encoded. no cap. π¦
β¨ Synopsis β¨
this is scripts/synopsis.pl, the whole thing, verbatim, iconic behavior only:
#!/usr/bin/env perl
use strict;
use warnings;
use HTML::Entities::Interpolate;
# ------------------------------
my($block_1) = '<p>Para One</p>';
my($block_2) = "<p align='center'>Para Two</p>";
my($block_3) = 'http://tipjar.com/bin/test?foo=bar®=inald';
my($block_4) = $Entitize{$block_3};
print <<EOS;
<html>
<head>
<title>Test HTML::Entities::Interpolate</title>
</head>
<body>
<h1 align='center'>HTML::Entities::Interpolate</h1>
<form action='#'>
<table align='center'>
<tr>
<td align='center'>Input: <input name='data' value='$Entitize{$block_1}'></td>
</tr>
<tr>
<td align='center'><br>The full text of the block is <pre>$Entitize{$block_2}</pre></td>
</tr>
<tr>
<td align='center'><br>Check out the web page at: <a href='$block_3'>$block_4</a></td>
</tr>
</table>
</form>
</body>
</html>
EOS
like, look at $Entitize{$block_1} just vibing inside that value='...' β that's the whole trick. you interpolate straight into the string and it comes out entity-encoded. chef's kiss π
πΈ Description πΈ
HTML::Entities::Interpolate is a pure Perl module. that's it, that's the description. pure Perl, no compiled bits, no build drama, we love a low-maintenance queen π
π Constructor and initialization π
Not needed.
fr fr β there's nothing to set up. no new(), no args, no config. you just use it and start interpolating. main character module energy honestly. β¨
π See Also π
HTML::Entities. β the icon it's built on top of π«Ά
π§ Machine-Readable Change Log π§
the file Changes was converted into Changelog.ini by Module::Metadata::Changes. so if you're hunting for the lore, that's where it lives π
π₯ Repository π₯
https://github.com/ronsavage/HTML-Entities-Interpolate
go star it, bestie, it's free π
π«Ά Support π«Ά
https://rt.cpan.org/Public/Dist/Display.html?Name=HTML::Entities::Interpolate.
that's the RT queue. if something's broken, that's the vibe check spot π
π Author π
David Nicol <davidnicol@gmail.com>.
Maintainer: Ron Savage <ron@savage.net.au>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
ngl that last bit is important β same terms as Perl itself, and the full text is in the LICENSE file that ships with this module. don't sleep on it π
okay that's the whole page, you ate it, go encode some entities π
perl v5.42.0 β 2025-07-25 β HTML::E...erpolate(3) β¨ bye bestie, ily, go write clean HTML ππ¦πΈ
π¦ where this page comes from
- fedora 43: perl-HTML-Entities-Interpolate 1.10-27.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms