package HTML::String; use strictures 1; use HTML::String::Value; use Exporter 'import'; our $VERSION = '1.000002'; # 1.0.2 $VERSION = eval $VERSION; our @EXPORT = qw(html); sub html { HTML::String::Value->new($_[0]); } 1; __END__ =head1 NAME HTML::String - mark strings as HTML to get auto-escaping =head1 SYNOPSIS use HTML::String; my $not_html = 'Hello, Bob & Jake'; my $html = html('

').$not_html.html('

'); print html($html); #

Hello, Bob & Jake

or, alternatively, use HTML::String::Overload; my $not_html = 'Hello, Bob & Jake'; my $html = do { use HTML::String::Overload; "

${not_html}

"; } print html($html); #

Hello, Bob & Jake

(but see the L documentation for details and caveats). See also L for L