[dns-operations] creeping poorness of judgement

John Levine johnl at taugh.com
Tue Mar 17 21:59:43 UTC 2020


In article <20200317021853.D6F1F1621F39 at ary.qy> you write:
>In article <20200317014627.GW68408 at straasha.imrryr.org> you write:
>>Yes, the txtdata() method concatenates with spaces in a scalar context.
>
>Net::DNS is pretty funky. 

To beat this dead horse a little more, here's the code that Mail::SPF
uses to collect the text strings (in Mail::SPF::Server.pm)

        my $text = join('', $rr->char_str_list);

char_str_list() is right after txtdata() in the Net::DNS source code.
It returns the internal form of the data which is a list of the
strings.

Here's the slightly fancier code in Mail::DKIM  (in Mail::DKIM::PublicKey.pm

            # join with no intervening spaces, RFC 6376
            if ( Net::DNS->VERSION >= 0.69 ) {

                # must call txtdata() in a list context
                $strn = join '', $rr->txtdata;
            }
            else {
                # char_str_list method is 'historical'
                $strn = join '', $rr->char_str_list;
            }

-- 
Regards,
John Levine, johnl at taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly



More information about the dns-operations mailing list