https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7698

            Bug ID: 7698
           Summary: Prevent loading warnings.pm every eval statement
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: spamassassin
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: Undefined

Created attachment 5645
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5645&action=edit
Suggested fix.

Currently, lib/Mail/SpamAssassin/Plugin/Check.pm injects 'no warnings
q(uninitialized);' in every eval statement it compiles. This executes quite a
bit of code just to to set the COP hints at eval compile time. If we move the
no warnings statement just outside of the quoted eval call, then it will set
the hints on the COP that does the quoted eval call and it will be inherited.
This should help speed up the eval calls.

Proof of concept:

perl -w -E'use warnings; no warnings q(uninitialized); eval q{package bar; my
$foo; print $foo}'

Patch attached to ticket.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to