[libcatmandu-perl] 17/46: Fixing bind errors
Jonas Smedegaard
dr at jones.dk
Tue Oct 14 13:52:52 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.9205
in repository libcatmandu-perl.
commit 2fd5b0e244344fcf2f3478f966e27e41b5667576
Author: Patrick Hochstenbach <patrick.hochstenbach at ugent.be>
Date: Tue Jul 8 14:09:13 2014 +0200
Fixing bind errors
---
lib/Catmandu/Fix/Bind/hashmap.pm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/Catmandu/Fix/Bind/hashmap.pm b/lib/Catmandu/Fix/Bind/hashmap.pm
index 5f5ff7f..21eb2ca 100644
--- a/lib/Catmandu/Fix/Bind/hashmap.pm
+++ b/lib/Catmandu/Fix/Bind/hashmap.pm
@@ -32,11 +32,12 @@ sub add_to_hash {
sub bind {
my ($self,$data,$code,$name) = @_;
+
+ $data = $code->($data);
+
my $key = $data->{key};
my $value = $data->{value};
- $code->($data);
-
if (defined $key) {
if (is_string($key)) {
$self->add_to_hash($key,$value);
@@ -50,6 +51,8 @@ sub bind {
warn "$key is not a string or array for $value";
}
}
+
+ $data;
}
sub DESTROY {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcatmandu-perl.git
More information about the Pkg-perl-cvs-commits
mailing list