The existing code does the wrong thing if a string (rather than a compiled
regexp) is supplied for $expected. Happily perl will do the right thing
if you let it.
Hugo
Message-Id: <
200912041444.nB4EiqBj004436@zen.crypt.org>
my($prog, $expected, $runperl_args, $name) = @_;
local $Level = 2;
_fresh_perl($prog,
- sub { @_ ?
- $_[0] =~ (ref $expected ? $expected : /$expected/) :
- $expected },
+ sub { @_ ? $_[0] =~ $expected : $expected },
$runperl_args, $name);
}