{"action":"created","comment":{"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/comments/36936963","id":36936963,"diff_hunk":"@@ -98,37 +97,43 @@ handle query => sub {\n     $which_specified = \"Point-To-Point (\".int_to_str($end).\", \".int_to_str($start).\")\" if ($cidr == 31);\n     $which_specified = \"Host Only\" if ($cidr == 32);\n \n-    sub to_html {\n-\tmy $results = \"\";\n-    my $minwidth = \"70px\";\n-\tforeach my $result (@_) {\n-\t    $results .= \"<div><span class=\\\"subnet__label text--secondary\\\">$result->[0]: </span><span class=\\\"text--primary\\\">$result->[1]</span></div>\";\n-        $minwidth = \"140px\" if $result->[0] eq \"Host Address Range\";\n-\t}\n-\treturn $results . \"<style> .zci--answer .subnet__label {display: inline-block; min-width: $minwidth}</style>\";\n-    }\n-\n-    sub to_text {\n-\tmy $results = \"\";\n-\tforeach my $result (@_) {\n-\t    $results .= \"$result->[0]: $result->[1]\\n\";\n-\t}\n-\treturn $results;\n-    }\n-\n-    # We're putting them into an array because we want the output to be sorted.\n-    my @output = (\n-\t[\"Network\", int_to_str($network) . \"/$cidr (Class $class)\"],\n-\t[\"Netmask\", int_to_str($mask)],\n-\t[\"Specified\", \"$which_specified\"],\n+    my %output = (\n+\t\t\"Network\" => int_to_str($network) . \"/$cidr (Class $class)\",\n+\t\t\"Netmask\" => int_to_str($mask),\n+\t\t\"Specified\" => \"$which_specified\",\n     );\n \n+\tmy @output_keys = qw(Network Netmask Specified);","path":"lib/DDG/Goodie/SubnetCalc.pm","position":46,"original_position":46,"commit_id":"16f0e7c8e72684c9b45396bc8eb21243bcd2d987","original_commit_id":"16f0e7c8e72684c9b45396bc8eb21243bcd2d987","user":{"login":"moollaza","id":873785,"avatar_url":"https://avatars.githubusercontent.com/u/873785?v=3","gravatar_id":"","url":"https://api.github.com/users/moollaza","html_url":"https://github.com/moollaza","followers_url":"https://api.github.com/users/moollaza/followers","following_url":"https://api.github.com/users/moollaza/following{/other_user}","gists_url":"https://api.github.com/users/moollaza/gists{/gist_id}","starred_url":"https://api.github.com/users/moollaza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moollaza/subscriptions","organizations_url":"https://api.github.com/users/moollaza/orgs","repos_url":"https://api.github.com/users/moollaza/repos","events_url":"https://api.github.com/users/moollaza/events{/privacy}","received_events_url":"https://api.github.com/users/moollaza/received_events","type":"User","site_admin":false},"body":"nit: I just realized these are tabs :scream: \r\n\r\nPlease switch to spaces :smile: ","created_at":"2015-08-13T02:51:18Z","updated_at":"2015-08-13T02:51:18Z","html_url":"https://github.com/duckduckgo/zeroclickinfo-goodies/pull/1259#discussion_r36936963","pull_request_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1259","_links":{"self":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/comments/36936963"},"html":{"href":"https://github.com/duckduckgo/zeroclickinfo-goodies/pull/1259#discussion_r36936963"},"pull_request":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1259"}}},"pull_request":{"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1259","id":39523780,"html_url":"https://github.com/duckduckgo/zeroclickinfo-goodies/pull/1259","diff_url":"https://github.com/duckduckgo/zeroclickinfo-goodies/pull/1259.diff","patch_url":"https://github.com/duckduckgo/zeroclickinfo-goodies/pull/1259.patch","issue_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/1259","number":1259,"state":"open","locked":false,"title":"SubnetCalc: Updating to use the record template","user":{"login":"mintsoft","id":978048,"avatar_url":"https://avatars.githubusercontent.com/u/978048?v=3","gravatar_id":"","url":"https://api.github.com/users/mintsoft","html_url":"https://github.com/mintsoft","followers_url":"https://api.github.com/users/mintsoft/followers","following_url":"https://api.github.com/users/mintsoft/following{/other_user}","gists_url":"https://api.github.com/users/mintsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mintsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mintsoft/subscriptions","organizations_url":"https://api.github.com/users/mintsoft/orgs","repos_url":"https://api.github.com/users/mintsoft/repos","events_url":"https://api.github.com/users/mintsoft/events{/privacy}","received_events_url":"https://api.github.com/users/mintsoft/received_events","type":"User","site_admin":false},"body":"This basically looks the same; however it uses the template:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/978048/8582341/27bcbbea-25be-11e5-8037-018a7a425ab3.png)\r\n\r\n\r\nI found writing the tests for the structured answers really laborious; is there a short `.*` for the hash so that the structure only needs to be tested once?\r\n\r\n","created_at":"2015-07-08T21:10:45Z","updated_at":"2015-08-13T02:51:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54114922f960cf33f22eb2699af912f4488ea63d","assignee":{"login":"moollaza","id":873785,"avatar_url":"https://avatars.githubusercontent.com/u/873785?v=3","gravatar_id":"","url":"https://api.github.com/users/moollaza","html_url":"https://github.com/moollaza","followers_url":"https://api.github.com/users/moollaza/followers","following_url":"https://api.github.com/users/moollaza/following{/other_user}","gists_url":"https://api.github.com/users/moollaza/gists{/gist_id}","starred_url":"https://api.github.com/users/moollaza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moollaza/subscriptions","organizations_url":"https://api.github.com/users/moollaza/orgs","repos_url":"https://api.github.com/users/moollaza/repos","events_url":"https://api.github.com/users/moollaza/events{/privacy}","received_events_url":"https://api.github.com/users/moollaza/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1259/commits","review_comments_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1259/comments","review_comment_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/comments{/number}","comments_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/1259/comments","statuses_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/statuses/16f0e7c8e72684c9b45396bc8eb21243bcd2d987","head":{"label":"duckduckgo:mintsoft-subnet-calc-template","ref":"mintsoft-subnet-calc-template","sha":"16f0e7c8e72684c9b45396bc8eb21243bcd2d987","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":2164979,"name":"zeroclickinfo-goodies","full_name":"duckduckgo/zeroclickinfo-goodies","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/zeroclickinfo-goodies","description":"DuckDuckGo instant answer plugins based on Perl functions","fork":false,"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies","forks_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/forks","keys_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/keys{/key_id}","collaborators_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/teams","hooks_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/hooks","issue_events_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/events{/number}","events_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/events","assignees_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/assignees{/user}","branches_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/branches{/branch}","tags_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/tags","blobs_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/git/refs{/sha}","trees_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/git/trees{/sha}","statuses_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/statuses/{sha}","languages_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/languages","stargazers_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/stargazers","contributors_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/contributors","subscribers_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/subscribers","subscription_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/subscription","commits_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/commits{/sha}","git_commits_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/git/commits{/sha}","comments_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/comments{/number}","issue_comment_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/comments{/number}","contents_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/contents/{+path}","compare_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/compare/{base}...{head}","merges_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/merges","archive_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/downloads","issues_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues{/number}","pulls_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls{/number}","milestones_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/milestones{/number}","notifications_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/labels{/name}","releases_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/releases{/id}","created_at":"2011-08-06T13:26:05Z","updated_at":"2015-08-11T18:48:06Z","pushed_at":"2015-08-12T23:37:11Z","git_url":"git://github.com/duckduckgo/zeroclickinfo-goodies.git","ssh_url":"git@github.com:duckduckgo/zeroclickinfo-goodies.git","clone_url":"https://github.com/duckduckgo/zeroclickinfo-goodies.git","svn_url":"https://github.com/duckduckgo/zeroclickinfo-goodies","homepage":"http://duckduckhack.com/","size":30045,"stargazers_count":308,"watchers_count":308,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":971,"mirror_url":null,"open_issues_count":141,"forks":971,"open_issues":141,"watchers":308,"default_branch":"master"}},"base":{"label":"duckduckgo:master","ref":"master","sha":"985cda20701b6edfb652664c5efc90540fd790db","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":2164979,"name":"zeroclickinfo-goodies","full_name":"duckduckgo/zeroclickinfo-goodies","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/zeroclickinfo-goodies","description":"DuckDuckGo instant answer plugins based on Perl functions","fork":false,"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies","forks_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/forks","keys_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/keys{/key_id}","collaborators_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/teams","hooks_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/hooks","issue_events_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/events{/number}","events_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/events","assignees_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/assignees{/user}","branches_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/branches{/branch}","tags_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/tags","blobs_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/git/refs{/sha}","trees_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/git/trees{/sha}","statuses_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/statuses/{sha}","languages_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/languages","stargazers_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/stargazers","contributors_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/contributors","subscribers_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/subscribers","subscription_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/subscription","commits_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/commits{/sha}","git_commits_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/git/commits{/sha}","comments_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/comments{/number}","issue_comment_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/comments{/number}","contents_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/contents/{+path}","compare_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/compare/{base}...{head}","merges_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/merges","archive_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/downloads","issues_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues{/number}","pulls_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls{/number}","milestones_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/milestones{/number}","notifications_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/labels{/name}","releases_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/releases{/id}","created_at":"2011-08-06T13:26:05Z","updated_at":"2015-08-11T18:48:06Z","pushed_at":"2015-08-12T23:37:11Z","git_url":"git://github.com/duckduckgo/zeroclickinfo-goodies.git","ssh_url":"git@github.com:duckduckgo/zeroclickinfo-goodies.git","clone_url":"https://github.com/duckduckgo/zeroclickinfo-goodies.git","svn_url":"https://github.com/duckduckgo/zeroclickinfo-goodies","homepage":"http://duckduckhack.com/","size":30045,"stargazers_count":308,"watchers_count":308,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":971,"mirror_url":null,"open_issues_count":141,"forks":971,"open_issues":141,"watchers":308,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1259"},"html":{"href":"https://github.com/duckduckgo/zeroclickinfo-goodies/pull/1259"},"issue":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/1259"},"comments":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/1259/comments"},"review_comments":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1259/comments"},"review_comment":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1259/commits"},"statuses":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/statuses/16f0e7c8e72684c9b45396bc8eb21243bcd2d987"}}}}