in reply to Using the filter option of HTML::Template

$textref is a scalar reference so you need to dereference it in the substitution:
$$textref =~ s/!!!blargle!!!/<tmpl_include $policy_file>/g;
Note the double '$$'