package With; use strict; use Regexp::Common; use Filter::Simple; FILTER_ONLY code => sub { s[ with \s* ( $RE{balanced}{-parens => '()'} ) \s* { ] < my($t) = $1 =~ /\((.*)\)/; $t =~ /^[_a-zA-Z](?:(?:\w*)(?:(?:'|::)(?:\w+)+)?)*\z/ ? "{ package $t;" : "for($t) {" >iexsg; }, ; q{ they think it's all over, and now it is };