Bug 6396

Summary: [test] Use of uninitialized value in lc at lib/Mail/SpamAssassin/Plugin/MIMEEval.pm
Product: Spamassassin Reporter: Todd Rinaldo <toddr>
Component: LibrariesAssignee: SpamAssassin Developer Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal CC: jm, toddr
Priority: P5    
Version: SVN Trunk (Latest Devel Version)   
Target Milestone: 3.3.2   
Hardware: Other   
OS: All   
Whiteboard:
Attachments: fix to above bug

Description Todd Rinaldo 2010-03-30 18:35:29 UTC
Created attachment 4727 [details]
fix to above bug

Running the test suite, I see:

Use of uninitialized value in lc at ../lib/Mail/SpamAssassin/Plugin/MIMEEval.pm

The attached patch should be a simple fix.

I would suggest maybe looking at Test::NoWarnings to autodetect these in the future.
Comment 1 Mark Martinec 2010-03-31 00:05:34 UTC
> Created an attachment (id=4727) fix to above bug
> Running the test suite, I see:
>   Use of uninitialized value in lc
>   at ../lib/Mail/SpamAssassin/Plugin/MIMEEval.pm
> The attached patch should be a simple fix.

Thanks, I see them too now that I switched to perl 5.12.0. Ugly.

trunk:
Sending lib/Mail/SpamAssassin/Plugin/MIMEEval.pm
Committed revision 929342.

3.3 (declaring it a trivial fix):
Sending lib/Mail/SpamAssassin/Plugin/MIMEEval.pm
Committed revision 929343.


> I would suggest maybe looking at Test::NoWarnings to autodetect these
> in the future.

Thoughts?
Comment 2 Justin Mason 2010-03-31 09:25:50 UTC
(In reply to comment #1)
> > I would suggest maybe looking at Test::NoWarnings to autodetect these
> > in the future.
> 
> Thoughts?

+1.  it'd be a good "xt" test.

talking of which I need to figure out how to run those on hudson.
Comment 3 Todd Rinaldo 2010-03-31 15:34:12 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > > I would suggest maybe looking at Test::NoWarnings to autodetect these
> > > in the future.
> > 
> > Thoughts?
> 
> +1.  it'd be a good "xt" test.
> 
> talking of which I need to figure out how to run those on hudson.

I agree it kinda fits in the xt category, but to be useful, it has to monitor your existing test suite. otherwise it would have never caught this one that I'm reporting.

To be useful, I think you'd have to add it to every test file and bump the test count by one.

Of course it would have to be added as a build_requires item too.
Comment 4 Mark Martinec 2011-05-11 12:46:50 UTC
Closing, the trivial fix is in 3.3 and in trunk.
A test is not happening...