1package FilterOnlyTest; 2 3use Filter::Simple; 4 5FILTER_ONLY 6 string => sub { 7 my $class = shift; 8 while (my($pat, $str) = splice @_, 0, 2) { 9 s/$pat/$str/g; 10 } 11 }; 12