{"action":"created","comment":{"url":"https://api.github.com/repos/duckduckgo/duckduckgo/pulls/comments/68410080","id":68410080,"diff_hunk":"@@ -122,6 +123,37 @@ sub get_ia {\n     return $m;\n }\n \n+# filter_ias({ repo => 'goodies', dev_milestone => 'live'... })\n+# Lookups combine as an AND operation.\n+# Returns a list of IAs on `wantarray', otherwise an (id => ia) HASH ref.\n+#\n+# Each condition consists of a $key and $lookup.\n+# $lookup should be either a string, ARRAY ref, or CODE ref.\n+# If a string, then $lookup is compared with `eq'\n+# If a CODE ref, then $lookup is called with the IAs $key attribute and\n+# should return a boolean value.\n+# If an ARRAY ref, then the above two rules are used with each element, the\n+# IA only needs to satisfy one.\n+sub filter_ias {\n+\tmy ($lookups) = @_;","path":"lib/DDG/Meta/Data.pm","position":24,"original_position":24,"commit_id":"f5da30abdcc2036ab1bb843dc2ace525345e467e","original_commit_id":"f5da30abdcc2036ab1bb843dc2ace525345e467e","user":{"login":"GuiltyDolphin","id":8598426,"avatar_url":"https://avatars.githubusercontent.com/u/8598426?v=3","gravatar_id":"","url":"https://api.github.com/users/GuiltyDolphin","html_url":"https://github.com/GuiltyDolphin","followers_url":"https://api.github.com/users/GuiltyDolphin/followers","following_url":"https://api.github.com/users/GuiltyDolphin/following{/other_user}","gists_url":"https://api.github.com/users/GuiltyDolphin/gists{/gist_id}","starred_url":"https://api.github.com/users/GuiltyDolphin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuiltyDolphin/subscriptions","organizations_url":"https://api.github.com/users/GuiltyDolphin/orgs","repos_url":"https://api.github.com/users/GuiltyDolphin/repos","events_url":"https://api.github.com/users/GuiltyDolphin/events{/privacy}","received_events_url":"https://api.github.com/users/GuiltyDolphin/received_events","type":"User","site_admin":false},"body":"Uhh, why is this package a 'class'? It doesn't have anything we'd want to expose? Surely using it as a package with an export so people can do `use DDG::Meta::Data qw(filter_ias by_id ...)` would be more useful?\r\n\r\nI guess this might break something though, so... Meh.","created_at":"2016-06-24T14:54:08Z","updated_at":"2016-06-24T14:54:08Z","html_url":"https://github.com/duckduckgo/duckduckgo/pull/195#discussion_r68410080","pull_request_url":"https://api.github.com/repos/duckduckgo/duckduckgo/pulls/195","_links":{"self":{"href":"https://api.github.com/repos/duckduckgo/duckduckgo/pulls/comments/68410080"},"html":{"href":"https://github.com/duckduckgo/duckduckgo/pull/195#discussion_r68410080"},"pull_request":{"href":"https://api.github.com/repos/duckduckgo/duckduckgo/pulls/195"}}},"pull_request":{"url":"https://api.github.com/repos/duckduckgo/duckduckgo/pulls/195","id":70014630,"html_url":"https://github.com/duckduckgo/duckduckgo/pull/195","diff_url":"https://github.com/duckduckgo/duckduckgo/pull/195.diff","patch_url":"https://github.com/duckduckgo/duckduckgo/pull/195.patch","issue_url":"https://api.github.com/repos/duckduckgo/duckduckgo/issues/195","number":195,"state":"open","locked":false,"title":"Meta::Data - support multi-metadata lookups","user":{"login":"GuiltyDolphin","id":8598426,"avatar_url":"https://avatars.githubusercontent.com/u/8598426?v=3","gravatar_id":"","url":"https://api.github.com/users/GuiltyDolphin","html_url":"https://github.com/GuiltyDolphin","followers_url":"https://api.github.com/users/GuiltyDolphin/followers","following_url":"https://api.github.com/users/GuiltyDolphin/following{/other_user}","gists_url":"https://api.github.com/users/GuiltyDolphin/gists{/gist_id}","starred_url":"https://api.github.com/users/GuiltyDolphin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuiltyDolphin/subscriptions","organizations_url":"https://api.github.com/users/GuiltyDolphin/orgs","repos_url":"https://api.github.com/users/GuiltyDolphin/repos","events_url":"https://api.github.com/users/GuiltyDolphin/events{/privacy}","received_events_url":"https://api.github.com/users/GuiltyDolphin/received_events","type":"User","site_admin":false},"body":"Add 'get_ias', which allows fetching of multiple IAs that satisfy some lookups joined in an AND condition.\r\n\r\nFor example, if you wanted to get all the cheat sheets that were live, you could do:\r\n\r\n```perl\r\nDDG::Meta::Data::get_ias(\r\n    id => sub { $_[0] =~ /_cheat_sheet$/ }, \r\n    production_status => 'live'\r\n);\r\n\r\n# Gives a bunch of cheat sheets.\r\n```\r\n\r\n@zachthompson Got any improvements? It seems pretty good speed-wise, though I haven't profiled it...","created_at":"2016-05-13T15:31:33Z","updated_at":"2016-06-24T14:54:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49df0f60c70df6feb9508665ce37f8355c6e5d02","assignee":{"login":"zachthompson","id":1467466,"avatar_url":"https://avatars.githubusercontent.com/u/1467466?v=3","gravatar_id":"","url":"https://api.github.com/users/zachthompson","html_url":"https://github.com/zachthompson","followers_url":"https://api.github.com/users/zachthompson/followers","following_url":"https://api.github.com/users/zachthompson/following{/other_user}","gists_url":"https://api.github.com/users/zachthompson/gists{/gist_id}","starred_url":"https://api.github.com/users/zachthompson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zachthompson/subscriptions","organizations_url":"https://api.github.com/users/zachthompson/orgs","repos_url":"https://api.github.com/users/zachthompson/repos","events_url":"https://api.github.com/users/zachthompson/events{/privacy}","received_events_url":"https://api.github.com/users/zachthompson/received_events","type":"User","site_admin":false},"assignees":[{"login":"zachthompson","id":1467466,"avatar_url":"https://avatars.githubusercontent.com/u/1467466?v=3","gravatar_id":"","url":"https://api.github.com/users/zachthompson","html_url":"https://github.com/zachthompson","followers_url":"https://api.github.com/users/zachthompson/followers","following_url":"https://api.github.com/users/zachthompson/following{/other_user}","gists_url":"https://api.github.com/users/zachthompson/gists{/gist_id}","starred_url":"https://api.github.com/users/zachthompson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zachthompson/subscriptions","organizations_url":"https://api.github.com/users/zachthompson/orgs","repos_url":"https://api.github.com/users/zachthompson/repos","events_url":"https://api.github.com/users/zachthompson/events{/privacy}","received_events_url":"https://api.github.com/users/zachthompson/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/duckduckgo/duckduckgo/pulls/195/commits","review_comments_url":"https://api.github.com/repos/duckduckgo/duckduckgo/pulls/195/comments","review_comment_url":"https://api.github.com/repos/duckduckgo/duckduckgo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/duckduckgo/duckduckgo/issues/195/comments","statuses_url":"https://api.github.com/repos/duckduckgo/duckduckgo/statuses/f5da30abdcc2036ab1bb843dc2ace525345e467e","head":{"label":"duckduckgo:gd/get-ia-multiple","ref":"gd/get-ia-multiple","sha":"f5da30abdcc2036ab1bb843dc2ace525345e467e","user":{"login":"duckduckgo","id":342708,"avatar_url":"https://avatars.githubusercontent.com/u/342708?v=3","gravatar_id":"","url":"https://api.github.com/users/duckduckgo","html_url":"https://github.com/duckduckgo","followers_url":"https://api.github.com/users/duckduckgo/followers","following_url":"https://api.github.com/users/duckduckgo/following{/other_user}","gists_url":"https://api.github.com/users/duckduckgo/gists{/gist_id}","starred_url":"https://api.github.com/users/duckduckgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckduckgo/subscriptions","organizations_url":"https://api.github.com/users/duckduckgo/orgs","repos_url":"https://api.github.com/users/duckduckgo/repos","events_url":"https://api.github.com/users/duckduckgo/events{/privacy}","received_events_url":"https://api.github.com/users/duckduckgo/received_events","type":"Organization","site_admin":false},"repo":{"id":1267640,"name":"duckduckgo","full_name":"duckduckgo/duckduckgo","owner":{"login":"duckduckgo","id":342708,"avatar_url":"https://avatars.githubusercontent.com/u/342708?v=3","gravatar_id":"","url":"https://api.github.com/users/duckduckgo","html_url":"https://github.com/duckduckgo","followers_url":"https://api.github.com/users/duckduckgo/followers","following_url":"https://api.github.com/users/duckduckgo/following{/other_user}","gists_url":"https://api.github.com/users/duckduckgo/gists{/gist_id}","starred_url":"https://api.github.com/users/duckduckgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckduckgo/subscriptions","organizations_url":"https://api.github.com/users/duckduckgo/orgs","repos_url":"https://api.github.com/users/duckduckgo/repos","events_url":"https://api.github.com/users/duckduckgo/events{/privacy}","received_events_url":"https://api.github.com/users/duckduckgo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/duckduckgo/duckduckgo","description":"DuckDuckGo Instant Answer Infrastructure","fork":false,"url":"https://api.github.com/repos/duckduckgo/duckduckgo","forks_url":"https://api.github.com/repos/duckduckgo/duckduckgo/forks","keys_url":"https://api.github.com/repos/duckduckgo/duckduckgo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/duckduckgo/duckduckgo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/duckduckgo/duckduckgo/teams","hooks_url":"https://api.github.com/repos/duckduckgo/duckduckgo/hooks","issue_events_url":"https://api.github.com/repos/duckduckgo/duckduckgo/issues/events{/number}","events_url":"https://api.github.com/repos/duckduckgo/duckduckgo/events","assignees_url":"https://api.github.com/repos/duckduckgo/duckduckgo/assignees{/user}","branches_url":"https://api.github.com/repos/duckduckgo/duckduckgo/branches{/branch}","tags_url":"https://api.github.com/repos/duckduckgo/duckduckgo/tags","blobs_url":"https://api.github.com/repos/duckduckgo/duckduckgo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/duckduckgo/duckduckgo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/duckduckgo/duckduckgo/git/refs{/sha}","trees_url":"https://api.github.com/repos/duckduckgo/duckduckgo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/duckduckgo/duckduckgo/statuses/{sha}","languages_url":"https://api.github.com/repos/duckduckgo/duckduckgo/languages","stargazers_url":"https://api.github.com/repos/duckduckgo/duckduckgo/stargazers","contributors_url":"https://api.github.com/repos/duckduckgo/duckduckgo/contributors","subscribers_url":"https://api.github.com/repos/duckduckgo/duckduckgo/subscribers","subscription_url":"https://api.github.com/repos/duckduckgo/duckduckgo/subscription","commits_url":"https://api.github.com/repos/duckduckgo/duckduckgo/commits{/sha}","git_commits_url":"https://api.github.com/repos/duckduckgo/duckduckgo/git/commits{/sha}","comments_url":"https://api.github.com/repos/duckduckgo/duckduckgo/comments{/number}","issue_comment_url":"https://api.github.com/repos/duckduckgo/duckduckgo/issues/comments{/number}","contents_url":"https://api.github.com/repos/duckduckgo/duckduckgo/contents/{+path}","compare_url":"https://api.github.com/repos/duckduckgo/duckduckgo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/duckduckgo/duckduckgo/merges","archive_url":"https://api.github.com/repos/duckduckgo/duckduckgo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/duckduckgo/duckduckgo/downloads","issues_url":"https://api.github.com/repos/duckduckgo/duckduckgo/issues{/number}","pulls_url":"https://api.github.com/repos/duckduckgo/duckduckgo/pulls{/number}","milestones_url":"https://api.github.com/repos/duckduckgo/duckduckgo/milestones{/number}","notifications_url":"https://api.github.com/repos/duckduckgo/duckduckgo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/duckduckgo/duckduckgo/labels{/name}","releases_url":"https://api.github.com/repos/duckduckgo/duckduckgo/releases{/id}","deployments_url":"https://api.github.com/repos/duckduckgo/duckduckgo/deployments","created_at":"2011-01-18T16:30:51Z","updated_at":"2016-06-24T07:47:10Z","pushed_at":"2016-06-23T16:03:36Z","git_url":"git://github.com/duckduckgo/duckduckgo.git","ssh_url":"git@github.com:duckduckgo/duckduckgo.git","clone_url":"https://github.com/duckduckgo/duckduckgo.git","svn_url":"https://github.com/duckduckgo/duckduckgo","homepage":"http://duckduckhack.com/","size":1318,"stargazers_count":1014,"watchers_count":1014,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":169,"mirror_url":null,"open_issues_count":34,"forks":169,"open_issues":34,"watchers":1014,"default_branch":"master"}},"base":{"label":"duckduckgo:master","ref":"master","sha":"90fc46a46950f68817f8253cfe58c3e55c15c191","user":{"login":"duckduckgo","id":342708,"avatar_url":"https://avatars.githubusercontent.com/u/342708?v=3","gravatar_id":"","url":"https://api.github.com/users/duckduckgo","html_url":"https://github.com/duckduckgo","followers_url":"https://api.github.com/users/duckduckgo/followers","following_url":"https://api.github.com/users/duckduckgo/following{/other_user}","gists_url":"https://api.github.com/users/duckduckgo/gists{/gist_id}","starred_url":"https://api.github.com/users/duckduckgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckduckgo/subscriptions","organizations_url":"https://api.github.com/users/duckduckgo/orgs","repos_url":"https://api.github.com/users/duckduckgo/repos","events_url":"https://api.github.com/users/duckduckgo/events{/privacy}","received_events_url":"https://api.github.com/users/duckduckgo/received_events","type":"Organization","site_admin":false},"repo":{"id":1267640,"name":"duckduckgo","full_name":"duckduckgo/duckduckgo","owner":{"login":"duckduckgo","id":342708,"avatar_url":"https://avatars.githubusercontent.com/u/342708?v=3","gravatar_id":"","url":"https://api.github.com/users/duckduckgo","html_url":"https://github.com/duckduckgo","followers_url":"https://api.github.com/users/duckduckgo/followers","following_url":"https://api.github.com/users/duckduckgo/following{/other_user}","gists_url":"https://api.github.com/users/duckduckgo/gists{/gist_id}","starred_url":"https://api.github.com/users/duckduckgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckduckgo/subscriptions","organizations_url":"https://api.github.com/users/duckduckgo/orgs","repos_url":"https://api.github.com/users/duckduckgo/repos","events_url":"https://api.github.com/users/duckduckgo/events{/privacy}","received_events_url":"https://api.github.com/users/duckduckgo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/duckduckgo/duckduckgo","description":"DuckDuckGo Instant Answer Infrastructure","fork":false,"url":"https://api.github.com/repos/duckduckgo/duckduckgo","forks_url":"https://api.github.com/repos/duckduckgo/duckduckgo/forks","keys_url":"https://api.github.com/repos/duckduckgo/duckduckgo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/duckduckgo/duckduckgo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/duckduckgo/duckduckgo/teams","hooks_url":"https://api.github.com/repos/duckduckgo/duckduckgo/hooks","issue_events_url":"https://api.github.com/repos/duckduckgo/duckduckgo/issues/events{/number}","events_url":"https://api.github.com/repos/duckduckgo/duckduckgo/events","assignees_url":"https://api.github.com/repos/duckduckgo/duckduckgo/assignees{/user}","branches_url":"https://api.github.com/repos/duckduckgo/duckduckgo/branches{/branch}","tags_url":"https://api.github.com/repos/duckduckgo/duckduckgo/tags","blobs_url":"https://api.github.com/repos/duckduckgo/duckduckgo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/duckduckgo/duckduckgo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/duckduckgo/duckduckgo/git/refs{/sha}","trees_url":"https://api.github.com/repos/duckduckgo/duckduckgo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/duckduckgo/duckduckgo/statuses/{sha}","languages_url":"https://api.github.com/repos/duckduckgo/duckduckgo/languages","stargazers_url":"https://api.github.com/repos/duckduckgo/duckduckgo/stargazers","contributors_url":"https://api.github.com/repos/duckduckgo/duckduckgo/contributors","subscribers_url":"https://api.github.com/repos/duckduckgo/duckduckgo/subscribers","subscription_url":"https://api.github.com/repos/duckduckgo/duckduckgo/subscription","commits_url":"https://api.github.com/repos/duckduckgo/duckduckgo/commits{/sha}","git_commits_url":"https://api.github.com/repos/duckduckgo/duckduckgo/git/commits{/sha}","comments_url":"https://api.github.com/repos/duckduckgo/duckduckgo/comments{/number}","issue_comment_url":"https://api.github.com/repos/duckduckgo/duckduckgo/issues/comments{/number}","contents_url":"https://api.github.com/repos/duckduckgo/duckduckgo/contents/{+path}","compare_url":"https://api.github.com/repos/duckduckgo/duckduckgo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/duckduckgo/duckduckgo/merges","archive_url":"https://api.github.com/repos/duckduckgo/duckduckgo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/duckduckgo/duckduckgo/downloads","issues_url":"https://api.github.com/repos/duckduckgo/duckduckgo/issues{/number}","pulls_url":"https://api.github.com/repos/duckduckgo/duckduckgo/pulls{/number}","milestones_url":"https://api.github.com/repos/duckduckgo/duckduckgo/milestones{/number}","notifications_url":"https://api.github.com/repos/duckduckgo/duckduckgo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/duckduckgo/duckduckgo/labels{/name}","releases_url":"https://api.github.com/repos/duckduckgo/duckduckgo/releases{/id}","deployments_url":"https://api.github.com/repos/duckduckgo/duckduckgo/deployments","created_at":"2011-01-18T16:30:51Z","updated_at":"2016-06-24T07:47:10Z","pushed_at":"2016-06-23T16:03:36Z","git_url":"git://github.com/duckduckgo/duckduckgo.git","ssh_url":"git@github.com:duckduckgo/duckduckgo.git","clone_url":"https://github.com/duckduckgo/duckduckgo.git","svn_url":"https://github.com/duckduckgo/duckduckgo","homepage":"http://duckduckhack.com/","size":1318,"stargazers_count":1014,"watchers_count":1014,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":169,"mirror_url":null,"open_issues_count":34,"forks":169,"open_issues":34,"watchers":1014,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/duckduckgo/duckduckgo/pulls/195"},"html":{"href":"https://github.com/duckduckgo/duckduckgo/pull/195"},"issue":{"href":"https://api.github.com/repos/duckduckgo/duckduckgo/issues/195"},"comments":{"href":"https://api.github.com/repos/duckduckgo/duckduckgo/issues/195/comments"},"review_comments":{"href":"https://api.github.com/repos/duckduckgo/duckduckgo/pulls/195/comments"},"review_comment":{"href":"https://api.github.com/repos/duckduckgo/duckduckgo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/duckduckgo/duckduckgo/pulls/195/commits"},"statuses":{"href":"https://api.github.com/repos/duckduckgo/duckduckgo/statuses/f5da30abdcc2036ab1bb843dc2ace525345e467e"}}}}
{"actor":{"display_login":"GuiltyDolphin"}}