On Thu Dec 06 23:33:16 2012, TODDR wrote:
Show quoted text> Mail::SpamAssassin depended on this code to return a quoted number:
Show quoted text> This breaks the Mail::SpamAssassin. Given it breaks backwards
> compatibility break, could this
> be put back please?
Only if it is absolutely unavoidable, and then only as a short term measure.
rdatastr() returns the RHS of an RR string in zone file syntax defined
in RFC1035.
RFC1035 permits strings in zone files to be either quoted or a string of
contiguous characters (with no quotes).
The post-0.68 implementation is fully compliant with RFC1035, although
we now exploit more of that permitted behaviour than in previous versions.
SpamAssassin is therefore making the entirely unwarranted assumption
that all strings returned by rdatastr() will be quoted.
The reason for revisiting the whole issue of escaping and quoting is to
enable strings in TXT RRs to contain strings using non-Latin scripts.
Chucking in gratuitous ASCII quotes in foreign language text is
decidedly unwelcome to users of those languages.
If you are intending to process the information in the string, the
problem you now have can be avoided by using $rr->txtdata() instead of
rdatastr(). If you call this in scalar context, the entire RHS of the
TXT record will be returned as a single string, without any of the
quotes or escape sequences which are only added to the zone file strings.
rdatastr() is actually part of the old (pre 0.69) interface between
RR.pm and the subtype implementations. It only continues to work now
because there is a compatibility layer allowing both old and new RR
subtype architectures to coexist. This may disappear entirely when
compatibility mode is switched off, although this is unlikely to happen
anytime soon.
Dick