package Tie::HTMLEscape;
use CGI qw (escapeHTML);
use strict;
sub TIESCALAR {
my $class = shift;
my $str = escapeHTML ( (+shift));;
return bless \$str, $class;
}
sub FETCH {
my $self = shift;
return $$self;
}
sub STORE {
my $self = shift;
warn "wrong type to STORE" unless ref $self;
my $new_str = escapeHTML ( (+shift));;
warn "too many parms to STORE" if @_;
$$self = $new_str;
$$self;
}