Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 30606
Status: resolved
Priority: 0/
Queue: libwww-perl

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 5.808
Fixed in: (no value)



Subject: Document $TRANSLATE_UNDERSCORE in HTTP::Headers
The subject says it all. This should probably go into the documentation of the header() method, were the replacement of _ -> - is described. I think best practice would be to localize the variable and to document it so, i.e. local $HTTP::Headers::TRANSLATE_UNDERSCORE = 0; Regards, Slaven
The fact that it's not documented is intentional. The 5.800 "release notes" says: HTTP::Headers now special case field names that start with a ':'. This is used as an escape mechanism when you need the header names to not go through canonicalization. It means that you can force LWP to use a specific casing and even underscores in header names. The ugly $TRANSLATE_UNDERSCORE global has been undocumented as a result of this.
Thanks. Regards, Slaven