{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"milestone":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/d1588981e0248aaa0174906c99df180e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"d1588981e0248aaa0174906c99df180e","url":"https://api.github.com/users/petdance","login":"petdance","id":41100},"assignee":null,"updated_at":"2011-11-01T05:29:55Z","labels":[{"name":"imcc","color":"0A8394","url":"https://api.github.com/repos/petdance/scratch/labels/imcc"},{"name":"Pri-normal","color":"5B4E39","url":"https://api.github.com/repos/petdance/scratch/labels/Pri-normal"},{"name":"rfc","color":"4D3F90","url":"https://api.github.com/repos/petdance/scratch/labels/rfc"},{"name":"Sev-medium","color":"F9ECA1","url":"https://api.github.com/repos/petdance/scratch/labels/Sev-medium"}],"closed_at":null,"comments":0,"url":"https://api.github.com/repos/petdance/scratch/issues/118","body":"Originally reported in [http://rt.perl.org/rt3/Ticket/Display.html?id=39844 RT].\r\n\r\nIf no .params are given, no args checking is done on sub invocation.  From the original:\r\n\r\n{{{\r\nOn Sat Jul 15 23:29:10 2006, mdiep wrote:\r\n> I expect this to die with a \"too many args\" error, but it doesn't -- \r\n> it prints \"ok\":\r\n> \r\n> .sub main :main\r\n> test(\"foo\", \"bar\")\r\n> end\r\n> .end\r\n> \r\n> .sub test\r\n> print \"ok\\n\"\r\n> .return()\r\n> .end\r\n> \r\n> --\r\n> Matt Diephouse\r\n> \r\n}}}\r\n\r\n2 sample patches to achieve this (both of which are declared to fail) are attached to the original ticket. Neither apply cleanly to trunk.\r\n\r\nThere is a question, however, as to whether or not the existing behavior is desirable - should we always check args? should we always check except for :main? (should we check for :main too and suggest that the programmer use .param args :slurpy to avoid any issues?)\r\n\r\nThere's a test already committed in t/op/calling.t\r\nTrac ID #1033","html_url":"https://github.com/petdance/scratch/issues/118","title":"no args checking for a sub without params","number":118,"id":2105773,"created_at":"2011-11-01T05:29:55Z"},"action":"opened"}