package HTML::Entities::Interpolate; #use strict; use warnings; use HTML::Entities; use Tie::Function; our $VERSION = '1.10'; # ----------------------------------------------- tie my %Entitize, 'Tie::Function' => \&encode_entities; sub import{*{caller().'::Entitize'} = \%Entitize}; # ----------------------------------------------- 1; __END__ =head1 NAME HTML::Entities::Interpolate - Call HTML::Entities::encode_entities, via a hash, within a string =head1 Synopsis This is scripts/synopsis.pl: #!/usr/bin/env perl use strict; use warnings; use HTML::Entities::Interpolate; # ------------------------------ my($block_1) = '

Para One

'; my($block_2) = "

Para Two

"; my($block_3) = 'http://tipjar.com/bin/test?foo=bar®=inald'; my($block_4) = $Entitize{$block_3}; print < Test HTML::Entities::Interpolate

HTML::Entities::Interpolate

Input:

The full text of the block is
$Entitize{$block_2}

Check out the web page at: $block_4
EOS =head1 Description C is a pure Perl module. =head1 Constructor and initialization Not needed. =head1 See Also L. =head1 Machine-Readable Change Log The file Changes was converted into Changelog.ini by L. =head1 Repository L =head1 Support L. =head1 Author David Nicol . Maintainer: Ron Savage Iron@savage.net.auE>. 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. =cut