fastmail / mail-dkim

Mail::DKIM Perl module, forked from svn://svn.code.sf.net/p/dkimproxy/code/Mail-DKIM/trunk
8 stars 6 forks source link

Argument isn't numeric error in PublicKey.pm when using test version of Net::DNS #25

Open sidney opened 9 months ago

sidney commented 9 months ago

While testing a test version of Net::DNS which is version 1.40_02 I encountered an error in DKIM/PublickKey.pm where it checks the version. Also, see issue #8 in which the actual problem was the same bug in SpamAssassin that I have fixed in the upcoming 4.0.1 release, although your workaround in DKIM avoids the bug in SpamAssassin and is fine.

The correct way to check versions in perl is to add

use version;

(See https://metacpan.org/pod/version) and then change line 107 to do the version comparison like this

if ( version->parse(Net::DNS->VERSION) >= version->parse(0.69) )