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; }
In reply to Re: Module Ideas - Tie::HTMLencode (boo)
by boo_radley
in thread Module Ideas - Tie::HTMLencode and Tie::UrlEncode
by rrwo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |