{"action":"opened","issue":{"url":"https://api.github.com/repos/perl-ldap/perl-ldap/issues/46","repository_url":"https://api.github.com/repos/perl-ldap/perl-ldap","labels_url":"https://api.github.com/repos/perl-ldap/perl-ldap/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/perl-ldap/perl-ldap/issues/46/comments","events_url":"https://api.github.com/repos/perl-ldap/perl-ldap/issues/46/events","html_url":"https://github.com/perl-ldap/perl-ldap/issues/46","id":181128711,"number":46,"title":"get_value method returns nothing if the requested key does not exist","user":{"login":"fieteboerner","id":8209685,"avatar_url":"https://avatars.githubusercontent.com/u/8209685?v=3","gravatar_id":"","url":"https://api.github.com/users/fieteboerner","html_url":"https://github.com/fieteboerner","followers_url":"https://api.github.com/users/fieteboerner/followers","following_url":"https://api.github.com/users/fieteboerner/following{/other_user}","gists_url":"https://api.github.com/users/fieteboerner/gists{/gist_id}","starred_url":"https://api.github.com/users/fieteboerner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fieteboerner/subscriptions","organizations_url":"https://api.github.com/users/fieteboerner/orgs","repos_url":"https://api.github.com/users/fieteboerner/repos","events_url":"https://api.github.com/users/fieteboerner/events{/privacy}","received_events_url":"https://api.github.com/users/fieteboerner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-05T11:31:58Z","updated_at":"2016-10-05T11:31:58Z","closed_at":null,"body":"Today I faced an issue by requesting a value by calling `$entry->get_value('optional_attribute_key')` and try to put it directly in a hash/hashref like:\r\n\r\n```perl\r\nmy $data = (\r\n    ...\r\n    'key' => $entry->get_value('optional_attribute_key'),\r\n    ...\r\n);\r\n```\r\n \r\nperl throws `Odd number of elements in hash assignment at ...`\r\n\r\nThe problem is that the whole hash is broken and returns mixed invalid values.\r\n\r\nI have researched your library and have found this line: [Entry.pm:130](https://github.com/perl-ldap/perl-ldap/blob/master/lib/Net/LDAP/Entry.pm#L130)\r\nThe function returns `nothing` and not as expected `undef` like it is written in the [documentation](https://metacpan.org/pod/Net::LDAP::Entry#get_value-ATTR-OPTIONS). so it seems to be a bug. \r\n"}}
{"actor":{"display_login":"fieteboerner"}}