$e = $string->html_encoded(); $b = $string->base64(); #### package My_string; @ISA = qw( HTML_decorator Base64_decorator ); #### for $i (@input_strings) { if (&is_plain ($i)) { $s = $i; } elsif (&is_html ($i)) { $s = new HTML_decorator ($i); } elsif (&is_CDATA ($i)) { $s = new Base64_decorator ($i); } push @output, $s; }