22 lines
822 B
Text
22 lines
822 B
Text
|
Fix for cpan bug 149825 (https://rt.cpan.org/Ticket/Display.html?id=149825)
|
||
|
Index: lib/Mail/SPF/Server.pm
|
||
|
--- lib/Mail/SPF/Server.pm.orig
|
||
|
+++ lib/Mail/SPF/Server.pm
|
||
|
@@ -513,7 +513,15 @@ sub get_acceptable_records_from_packet {
|
||
|
foreach my $rr ($packet->answer) {
|
||
|
next if $rr->type ne $rr_type; # Ignore RRs of unexpected type.
|
||
|
|
||
|
- my $text = join('', $rr->char_str_list);
|
||
|
+ my $text;
|
||
|
+ # join with no intervening spaces, RFC 6376
|
||
|
+ if ( Net::DNS->VERSION >= 0.69 ) {
|
||
|
+ # must call txtdata() in a list context
|
||
|
+ $text = join '', $rr->txtdata;
|
||
|
+ } else {
|
||
|
+ # char_str_list method is 'historical'
|
||
|
+ $text = join('', $rr->char_str_list);
|
||
|
+ }
|
||
|
my $record;
|
||
|
|
||
|
# Try to parse RR as each of the requested record versions,
|