1package Filter::Simple::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 code_no_comments => sub { 13 $_ =~ /shromple/ and die "We wants no shromples!"; 14 }; 15