HTML::E...erpolate(3)

πŸ“¦
version 1.10 Β· 2 versions
, in fedora 43

πŸ’– 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&reg=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