https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6370

Mark Martinec <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P5                          |P3
   Target Milestone|Undefined                   |3.3.1

--- Comment #7 from Mark Martinec <[email protected]> 2010-03-11 16:41:28 
UTC ---
> sub image_name_regex {
>   my ($self,$pms,$body,$re) = @_;
> [...]
>   foreach my $name (keys %{$pms->{'imageinfo'}->{"names_all"}}) {
>     dbg("imageinfo: checking image named $name against regex $re");
>     my $eval = 'if (q{'.$name.'} =~  ' . $re . ') {  $hit = 1; } ';
>     eval $eval;

What is the purpose of this run-time eval here?
Wouldn't a plain compile-time eval suffice?
  if (eval { $name =~ /$re/ }) { $hit = 1 }

-- 
Configure bugmail: 
https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to