Header value wasn't deleted case-insensitively. Because the alias was
still removed correctly, it usually worked, but as of recently producing
warnings in sendheaders().
Also, delete returned the original key (not documented anywhere).
Change this to always return the deleted value, matching the behaviour
of normal hashes and user expectation.
+- Fix delete %header
- Fix breakage with old versions of Exporter
- Tests emulating actual PLP usage
use warnings;
use Carp;
-our $VERSION = '1.00';
+our $VERSION = '1.01';
=head1 PLP::Tie::Headers
sub DELETE {
my ($self, $key) = @_;
$key =~ tr/_/-/;
- delete $self->[0]->{$key};
- return delete $self->[1]->{lc $key};
+ defined ($key = delete $self->[1]->{lc $key}) or return;
+ return delete $self->[0]->{$key};
}
sub CLEAR {