{"action":"created","issue":{"url":"https://api.github.com/repos/miyagawa/CGI-Compile/issues/18","labels_url":"https://api.github.com/repos/miyagawa/CGI-Compile/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/miyagawa/CGI-Compile/issues/18/comments","events_url":"https://api.github.com/repos/miyagawa/CGI-Compile/issues/18/events","html_url":"https://github.com/miyagawa/CGI-Compile/issues/18","id":124463547,"number":18,"title":"Warnings for non-numeric return values","user":{"login":"eserte","id":65852,"avatar_url":"https://avatars.githubusercontent.com/u/65852?v=3","gravatar_id":"","url":"https://api.github.com/users/eserte","html_url":"https://github.com/eserte","followers_url":"https://api.github.com/users/eserte/followers","following_url":"https://api.github.com/users/eserte/following{/other_user}","gists_url":"https://api.github.com/users/eserte/gists{/gist_id}","starred_url":"https://api.github.com/users/eserte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eserte/subscriptions","organizations_url":"https://api.github.com/users/eserte/orgs","repos_url":"https://api.github.com/users/eserte/repos","events_url":"https://api.github.com/users/eserte/events{/privacy}","received_events_url":"https://api.github.com/users/eserte/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-31T11:47:09Z","updated_at":"2016-01-01T20:00:45Z","closed_at":null,"body":"If the last expression in the compiled cgi is a non-numeric value, then there are new warnings not seen in older versions of CGI::Compile. Consider the following cgi script, saved as test.cgi:\r\n```\r\n#!/usr/bin/perl -w\r\nuse CGI qw(:standard);\r\nprint header, start_html, 'hello', end_html;\r\nundef;\r\n```\r\nThis yields the following warning:\r\n```\r\n$ perl5.22.1 -MCGI::Compile -e '$sub = CGI::Compile->compile(\"test.cgi\"); $sub->()' > /dev/null \r\nUse of uninitialized value $rv in sprintf at /home/e/eserte/trash/test.cgi line 8.\r\n```\r\nIf `undef` in the cgi script was replaced with a non-numeric string, say `\"bla\"`, then the warning looks like this:\r\n```\r\nArgument \"bla\" isn't numeric in sprintf at /home/e/eserte/trash/test.cgi line 8.\r\n```\r\nProbably the easiest solution is to put the right side of CGI/Compile.pm line 100 into a `no warnings` block."},"comment":{"url":"https://api.github.com/repos/miyagawa/CGI-Compile/issues/comments/168334907","html_url":"https://github.com/miyagawa/CGI-Compile/issues/18#issuecomment-168334907","issue_url":"https://api.github.com/repos/miyagawa/CGI-Compile/issues/18","id":168334907,"user":{"login":"rkitover","id":77611,"avatar_url":"https://avatars.githubusercontent.com/u/77611?v=3","gravatar_id":"","url":"https://api.github.com/users/rkitover","html_url":"https://github.com/rkitover","followers_url":"https://api.github.com/users/rkitover/followers","following_url":"https://api.github.com/users/rkitover/following{/other_user}","gists_url":"https://api.github.com/users/rkitover/gists{/gist_id}","starred_url":"https://api.github.com/users/rkitover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkitover/subscriptions","organizations_url":"https://api.github.com/users/rkitover/orgs","repos_url":"https://api.github.com/users/rkitover/repos","events_url":"https://api.github.com/users/rkitover/events{/privacy}","received_events_url":"https://api.github.com/users/rkitover/received_events","type":"User","site_admin":false},"created_at":"2016-01-01T20:00:45Z","updated_at":"2016-01-01T20:00:45Z","body":"@miyagawa \r\nI improved the test and suppressed another warning in that piece of code.\r\n\r\nShould be ready for release."}}