{"action":"created","comment":{"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/comments/35494655","id":35494655,"diff_hunk":"@@ -0,0 +1,44 @@\n+package DDG::Goodie::Factorial;\n+# ABSTRACT: n factorial\n+\n+use strict;\n+use DDG::Goodie;\n+\n+use List::Util qw(reduce);\n+use bigint;\n+\n+zci answer_type => \"factorial\";\n+zci is_cached   => 1;\n+\n+name \"Factorial\";\n+description \"Returns Factorial of n\";\n+primary_example_queries \"factorial 7\", \"7 factorial\";\n+secondary_example_queries \"12 fact\";\n+topics 'math';\n+category 'calculations';\n+code_url \"https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/Factorial.pm\";\n+attribution github => [\"https://github.com/codenirvana\", \"Udit Vasu\"],\n+            twitter => \"uditdistro\";\n+\n+triggers any => \"factorial\", \"fact\";\n+\n+handle remainder => sub {\n+    my $n = $_;\n+    \n+    #accept only numeric input\n+    if ($n =~ m/[^0-9]/){\n+        return;","path":"lib/DDG/Goodie/Factorial.pm","position":30,"original_position":30,"commit_id":"efddf3dbb4a985bc04740b272286d83bbf64706e","original_commit_id":"efddf3dbb4a985bc04740b272286d83bbf64706e","user":{"login":"codenirvana","id":4865836,"avatar_url":"https://avatars.githubusercontent.com/u/4865836?v=3","gravatar_id":"","url":"https://api.github.com/users/codenirvana","html_url":"https://github.com/codenirvana","followers_url":"https://api.github.com/users/codenirvana/followers","following_url":"https://api.github.com/users/codenirvana/following{/other_user}","gists_url":"https://api.github.com/users/codenirvana/gists{/gist_id}","starred_url":"https://api.github.com/users/codenirvana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codenirvana/subscriptions","organizations_url":"https://api.github.com/users/codenirvana/orgs","repos_url":"https://api.github.com/users/codenirvana/repos","events_url":"https://api.github.com/users/codenirvana/events{/privacy}","received_events_url":"https://api.github.com/users/codenirvana/received_events","type":"User","site_admin":false},"body":"@mintsoft I tried ```return undef;``` but then it shows a blank Answer!","created_at":"2015-07-26T16:30:22Z","updated_at":"2015-07-26T16:30:22Z","html_url":"https://github.com/duckduckgo/zeroclickinfo-goodies/pull/1335#discussion_r35494655","pull_request_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1335","_links":{"self":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/comments/35494655"},"html":{"href":"https://github.com/duckduckgo/zeroclickinfo-goodies/pull/1335#discussion_r35494655"},"pull_request":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1335"}}},"pull_request":{"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1335","id":40851004,"html_url":"https://github.com/duckduckgo/zeroclickinfo-goodies/pull/1335","diff_url":"https://github.com/duckduckgo/zeroclickinfo-goodies/pull/1335.diff","patch_url":"https://github.com/duckduckgo/zeroclickinfo-goodies/pull/1335.patch","issue_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/1335","number":1335,"state":"open","locked":false,"title":"Factorial of a number","user":{"login":"codenirvana","id":4865836,"avatar_url":"https://avatars.githubusercontent.com/u/4865836?v=3","gravatar_id":"","url":"https://api.github.com/users/codenirvana","html_url":"https://github.com/codenirvana","followers_url":"https://api.github.com/users/codenirvana/followers","following_url":"https://api.github.com/users/codenirvana/following{/other_user}","gists_url":"https://api.github.com/users/codenirvana/gists{/gist_id}","starred_url":"https://api.github.com/users/codenirvana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codenirvana/subscriptions","organizations_url":"https://api.github.com/users/codenirvana/orgs","repos_url":"https://api.github.com/users/codenirvana/repos","events_url":"https://api.github.com/users/codenirvana/events{/privacy}","received_events_url":"https://api.github.com/users/codenirvana/received_events","type":"User","site_admin":false},"body":"**What does your Instant Answer do?**\r\nFind the factorial of a given number\r\n\r\n**What problem does your Instant Answer solve (Why is it better than organic links)?**\r\nIt calculate the factorial of a number so that user don't have to use any other 3rd party tool/website.\r\n\r\n**Are there any other alternative (better) data sources?**\r\nNo\r\n\r\n**What are some example queries that trigger this Instant Answer?**\r\n* 7 factorial\r\n* 5 fact\r\n\r\n**Which communities will this Instant Answer be especially useful for? (gamers, book lovers, etc)**\r\nMaths\r\n\r\n**Is this Instant Answer connected to a DuckDuckHack [Instant Answer idea](https://duck.co/ideas)?**\r\nYes\r\n\r\n**Which existing Instant Answers will this one supercede/overlap with?**\r\nNone\r\n\r\n**Are you having any problems? Do you need our help with anything?**\r\nYes, I want to trigger the IA even if use search like **7!** but its not working. Maybe because of !bang.\r\n\r\n**What does the Instant Answer look like? (Provide a screenshot for new or updated Instant Answers)**\r\n![img1](http://i.imgur.com/6ehWPs6.png)\r\n\r\n![img2](http://i.imgur.com/NcST3BL.png)\r\n\r\n## Checklist\r\nPlease place an 'X' where appropriate.\r\n\r\n```\r\n- [X] Added metadata and attribution information (https://duck.co/duckduckhack/metadata)\r\n- [X] Wrote test file and added to t/ directory (https://duck.co/duckduckhack/goodie_tests)\r\n- [] Verified that instant answer adheres to design guidelines (https://duck.co/duckduckhack/design_styleguide)\r\n- [X] Verified that instant answer adheres to code styleguide (https://duck.co/duckduckhack/code_styleguide)\r\n- [X] Tested cross-browser compatibility\r\n\r\n    Please let us know which browsers/devices you've tested on:\r\n    - Windows 8\r\n        - [X] Google Chrome\r\n        - [] Firefox\r\n        - [] Opera\r\n        - [] IE 10\r\n\r\n    - Mac OSX\r\n        - [X] Google Chrome\r\n        - [] Firefox\r\n        - [] Opera\r\n        - [X] Safari\r\n```","created_at":"2015-07-26T10:00:38Z","updated_at":"2015-07-26T16:30:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8f977a0e6bb533d59698ddc8997bff44209d3808","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1335/commits","review_comments_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1335/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/1335/comments","statuses_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/statuses/efddf3dbb4a985bc04740b272286d83bbf64706e","head":{"label":"codenirvana:factorial","ref":"factorial","sha":"efddf3dbb4a985bc04740b272286d83bbf64706e","user":{"login":"codenirvana","id":4865836,"avatar_url":"https://avatars.githubusercontent.com/u/4865836?v=3","gravatar_id":"","url":"https://api.github.com/users/codenirvana","html_url":"https://github.com/codenirvana","followers_url":"https://api.github.com/users/codenirvana/followers","following_url":"https://api.github.com/users/codenirvana/following{/other_user}","gists_url":"https://api.github.com/users/codenirvana/gists{/gist_id}","starred_url":"https://api.github.com/users/codenirvana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codenirvana/subscriptions","organizations_url":"https://api.github.com/users/codenirvana/orgs","repos_url":"https://api.github.com/users/codenirvana/repos","events_url":"https://api.github.com/users/codenirvana/events{/privacy}","received_events_url":"https://api.github.com/users/codenirvana/received_events","type":"User","site_admin":false},"repo":{"id":37662218,"name":"zeroclickinfo-goodies","full_name":"codenirvana/zeroclickinfo-goodies","owner":{"login":"codenirvana","id":4865836,"avatar_url":"https://avatars.githubusercontent.com/u/4865836?v=3","gravatar_id":"","url":"https://api.github.com/users/codenirvana","html_url":"https://github.com/codenirvana","followers_url":"https://api.github.com/users/codenirvana/followers","following_url":"https://api.github.com/users/codenirvana/following{/other_user}","gists_url":"https://api.github.com/users/codenirvana/gists{/gist_id}","starred_url":"https://api.github.com/users/codenirvana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codenirvana/subscriptions","organizations_url":"https://api.github.com/users/codenirvana/orgs","repos_url":"https://api.github.com/users/codenirvana/repos","events_url":"https://api.github.com/users/codenirvana/events{/privacy}","received_events_url":"https://api.github.com/users/codenirvana/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/codenirvana/zeroclickinfo-goodies","description":"DuckDuckGo instant answer plugins based on Perl functions","fork":true,"url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies","forks_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/forks","keys_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/teams","hooks_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/hooks","issue_events_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/issues/events{/number}","events_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/events","assignees_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/assignees{/user}","branches_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/branches{/branch}","tags_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/tags","blobs_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/git/refs{/sha}","trees_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/statuses/{sha}","languages_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/languages","stargazers_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/stargazers","contributors_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/contributors","subscribers_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/subscribers","subscription_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/subscription","commits_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/commits{/sha}","git_commits_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/git/commits{/sha}","comments_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/comments{/number}","issue_comment_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/issues/comments{/number}","contents_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/contents/{+path}","compare_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/merges","archive_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/downloads","issues_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/issues{/number}","pulls_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/pulls{/number}","milestones_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/milestones{/number}","notifications_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/labels{/name}","releases_url":"https://api.github.com/repos/codenirvana/zeroclickinfo-goodies/releases{/id}","created_at":"2015-06-18T13:50:42Z","updated_at":"2015-06-18T13:50:46Z","pushed_at":"2015-07-26T14:30:12Z","git_url":"git://github.com/codenirvana/zeroclickinfo-goodies.git","ssh_url":"git@github.com:codenirvana/zeroclickinfo-goodies.git","clone_url":"https://github.com/codenirvana/zeroclickinfo-goodies.git","svn_url":"https://github.com/codenirvana/zeroclickinfo-goodies","homepage":"http://duckduckhack.com/","size":10259,"stargazers_count":0,"watchers_count":0,"language":"Perl","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"duckduckgo:master","ref":"master","sha":"25bf084dd344c17714675e3501417285cbb4d0f9","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-07-25T18:13:46Z","pushed_at":"2015-07-26T14:30:14Z","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":28735,"stargazers_count":295,"watchers_count":295,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":925,"mirror_url":null,"open_issues_count":136,"forks":925,"open_issues":136,"watchers":295,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1335"},"html":{"href":"https://github.com/duckduckgo/zeroclickinfo-goodies/pull/1335"},"issue":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/1335"},"comments":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/1335/comments"},"review_comments":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1335/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/1335/commits"},"statuses":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/statuses/efddf3dbb4a985bc04740b272286d83bbf64706e"}}}}