git.shiar.nl
/
perl
/
plp
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update META.yml to spec v1.4
[perl/plp/.git]
/
lib
/
PLP
/
Tie
/
Headers.pm
diff --git
a/lib/PLP/Tie/Headers.pm
b/lib/PLP/Tie/Headers.pm
index 8e023fb4fab45ce4cefb8ec8eee5dfac21b5e0ad..f0db9685db327b70ddbdf2ef9af4642a4a442277 100644
(file)
--- a/
lib/PLP/Tie/Headers.pm
+++ b/
lib/PLP/Tie/Headers.pm
@@
-4,7
+4,7
@@
use strict;
use warnings;
use Carp;
use warnings;
use Carp;
-our $VERSION = '1.0
0
';
+our $VERSION = '1.0
1
';
=head1 PLP::Tie::Headers
=head1 PLP::Tie::Headers
@@
-39,7
+39,8
@@
sub FETCH {
$self->[2] = 0;
}
$key =~ tr/_/-/;
$self->[2] = 0;
}
$key =~ tr/_/-/;
- return $self->[0]->{ $self->[1]->{lc $key} };
+ defined ($key = $self->[1]->{lc $key}) or return;
+ return $self->[0]->{$key};
}
sub STORE {
}
sub STORE {
@@
-63,8
+64,8
@@
sub STORE {
sub DELETE {
my ($self, $key) = @_;
$key =~ tr/_/-/;
sub DELETE {
my ($self, $key) = @_;
$key =~ tr/_/-/;
- de
lete $self->[0]->{$key}
;
- return delete $self->[
1]->{lc
$key};
+ de
fined ($key = delete $self->[1]->{lc $key}) or return
;
+ return delete $self->[
0]->{
$key};
}
sub CLEAR {
}
sub CLEAR {