{"action":"created","comment":{"url":"https://api.github.com/repos/maros/MooseX-App/pulls/comments/82521013","pull_request_review_id":3424487,"id":82521013,"diff_hunk":"@@ -656,15 +656,18 @@ sub command_usage_options {\n     $metaclass ||= $self;\n     \n     my @options;\n-    foreach my $attribute ($self->command_usage_attributes($metaclass,[qw(option proto)])) {\n+    foreach my $attribute (\n+        sort {\n+            $a->cmd_position <=> $b->cmd_position ||\n+            $a->cmd_usage_name cmp $b->cmd_usage_name\n+        } $self->command_usage_attributes($metaclass,[qw(option proto)])\n+    ) {\n         push(@options,[\n             $attribute->cmd_usage_name(),\n             $attribute->cmd_usage_description()\n         ]);\n     }\n     ","path":"lib/MooseX/App/Meta/Role/Class/Base.pm","position":16,"original_position":16,"commit_id":"ca0906d263ec2b7ad0e39ea176e6039b8259f0f3","original_commit_id":"b149b6dd6648388862350bce044251545a4f7bbd","user":{"login":"maros","id":82946,"avatar_url":"https://avatars.githubusercontent.com/u/82946?v=3","gravatar_id":"","url":"https://api.github.com/users/maros","html_url":"https://github.com/maros","followers_url":"https://api.github.com/users/maros/followers","following_url":"https://api.github.com/users/maros/following{/other_user}","gists_url":"https://api.github.com/users/maros/gists{/gist_id}","starred_url":"https://api.github.com/users/maros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maros/subscriptions","organizations_url":"https://api.github.com/users/maros/orgs","repos_url":"https://api.github.com/users/maros/repos","events_url":"https://api.github.com/users/maros/events{/privacy}","received_events_url":"https://api.github.com/users/maros/received_events","type":"User","site_admin":false},"body":"Removing the sort at line 667 makes sense, however I don't think that you need to sort in the foreach loop since command_usage_attributes already returns a sorted list. Maybe add the command name sorting fallback there? ( ' || $a->cmd_usage_name cmp $b->cmd_usage_name' )","created_at":"2016-10-09T11:52:50Z","updated_at":"2016-10-09T11:57:36Z","html_url":"https://github.com/maros/MooseX-App/pull/44#discussion_r82521013","pull_request_url":"https://api.github.com/repos/maros/MooseX-App/pulls/44","_links":{"self":{"href":"https://api.github.com/repos/maros/MooseX-App/pulls/comments/82521013"},"html":{"href":"https://github.com/maros/MooseX-App/pull/44#discussion_r82521013"},"pull_request":{"href":"https://api.github.com/repos/maros/MooseX-App/pulls/44"}}},"pull_request":{"url":"https://api.github.com/repos/maros/MooseX-App/pulls/44","id":88535021,"html_url":"https://github.com/maros/MooseX-App/pull/44","diff_url":"https://github.com/maros/MooseX-App/pull/44.diff","patch_url":"https://github.com/maros/MooseX-App/pull/44.patch","issue_url":"https://api.github.com/repos/maros/MooseX-App/issues/44","number":44,"state":"open","locked":false,"title":"Option Order/Position in Usage Message","user":{"login":"jrmash","id":2574997,"avatar_url":"https://avatars.githubusercontent.com/u/2574997?v=3","gravatar_id":"","url":"https://api.github.com/users/jrmash","html_url":"https://github.com/jrmash","followers_url":"https://api.github.com/users/jrmash/followers","following_url":"https://api.github.com/users/jrmash/following{/other_user}","gists_url":"https://api.github.com/users/jrmash/gists{/gist_id}","starred_url":"https://api.github.com/users/jrmash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrmash/subscriptions","organizations_url":"https://api.github.com/users/jrmash/orgs","repos_url":"https://api.github.com/users/jrmash/repos","events_url":"https://api.github.com/users/jrmash/events{/privacy}","received_events_url":"https://api.github.com/users/jrmash/received_events","type":"User","site_admin":false},"body":"According to the documentation for MooseX::App, the ordering of options / parameters in the usage message is something that can be altered by specifying the 'cmd_position' attribute property, however it does not appear to be functional for options.\r\n\r\nI am not sure if this was intended and the documentation is just overstating the feature, but this patch enables the feature for options.","created_at":"2016-10-08T05:48:57Z","updated_at":"2016-10-09T11:57:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0265abb57d3b638b346e0c62b3f8934bcb82db22","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/maros/MooseX-App/pulls/44/commits","review_comments_url":"https://api.github.com/repos/maros/MooseX-App/pulls/44/comments","review_comment_url":"https://api.github.com/repos/maros/MooseX-App/pulls/comments{/number}","comments_url":"https://api.github.com/repos/maros/MooseX-App/issues/44/comments","statuses_url":"https://api.github.com/repos/maros/MooseX-App/statuses/ca0906d263ec2b7ad0e39ea176e6039b8259f0f3","head":{"label":"jrmash:master","ref":"master","sha":"ca0906d263ec2b7ad0e39ea176e6039b8259f0f3","user":{"login":"jrmash","id":2574997,"avatar_url":"https://avatars.githubusercontent.com/u/2574997?v=3","gravatar_id":"","url":"https://api.github.com/users/jrmash","html_url":"https://github.com/jrmash","followers_url":"https://api.github.com/users/jrmash/followers","following_url":"https://api.github.com/users/jrmash/following{/other_user}","gists_url":"https://api.github.com/users/jrmash/gists{/gist_id}","starred_url":"https://api.github.com/users/jrmash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrmash/subscriptions","organizations_url":"https://api.github.com/users/jrmash/orgs","repos_url":"https://api.github.com/users/jrmash/repos","events_url":"https://api.github.com/users/jrmash/events{/privacy}","received_events_url":"https://api.github.com/users/jrmash/received_events","type":"User","site_admin":false},"repo":{"id":70304266,"name":"MooseX-App","full_name":"jrmash/MooseX-App","owner":{"login":"jrmash","id":2574997,"avatar_url":"https://avatars.githubusercontent.com/u/2574997?v=3","gravatar_id":"","url":"https://api.github.com/users/jrmash","html_url":"https://github.com/jrmash","followers_url":"https://api.github.com/users/jrmash/followers","following_url":"https://api.github.com/users/jrmash/following{/other_user}","gists_url":"https://api.github.com/users/jrmash/gists{/gist_id}","starred_url":"https://api.github.com/users/jrmash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrmash/subscriptions","organizations_url":"https://api.github.com/users/jrmash/orgs","repos_url":"https://api.github.com/users/jrmash/repos","events_url":"https://api.github.com/users/jrmash/events{/privacy}","received_events_url":"https://api.github.com/users/jrmash/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jrmash/MooseX-App","description":"Write user-friendly command line apps with even less suffering","fork":true,"url":"https://api.github.com/repos/jrmash/MooseX-App","forks_url":"https://api.github.com/repos/jrmash/MooseX-App/forks","keys_url":"https://api.github.com/repos/jrmash/MooseX-App/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jrmash/MooseX-App/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jrmash/MooseX-App/teams","hooks_url":"https://api.github.com/repos/jrmash/MooseX-App/hooks","issue_events_url":"https://api.github.com/repos/jrmash/MooseX-App/issues/events{/number}","events_url":"https://api.github.com/repos/jrmash/MooseX-App/events","assignees_url":"https://api.github.com/repos/jrmash/MooseX-App/assignees{/user}","branches_url":"https://api.github.com/repos/jrmash/MooseX-App/branches{/branch}","tags_url":"https://api.github.com/repos/jrmash/MooseX-App/tags","blobs_url":"https://api.github.com/repos/jrmash/MooseX-App/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jrmash/MooseX-App/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jrmash/MooseX-App/git/refs{/sha}","trees_url":"https://api.github.com/repos/jrmash/MooseX-App/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jrmash/MooseX-App/statuses/{sha}","languages_url":"https://api.github.com/repos/jrmash/MooseX-App/languages","stargazers_url":"https://api.github.com/repos/jrmash/MooseX-App/stargazers","contributors_url":"https://api.github.com/repos/jrmash/MooseX-App/contributors","subscribers_url":"https://api.github.com/repos/jrmash/MooseX-App/subscribers","subscription_url":"https://api.github.com/repos/jrmash/MooseX-App/subscription","commits_url":"https://api.github.com/repos/jrmash/MooseX-App/commits{/sha}","git_commits_url":"https://api.github.com/repos/jrmash/MooseX-App/git/commits{/sha}","comments_url":"https://api.github.com/repos/jrmash/MooseX-App/comments{/number}","issue_comment_url":"https://api.github.com/repos/jrmash/MooseX-App/issues/comments{/number}","contents_url":"https://api.github.com/repos/jrmash/MooseX-App/contents/{+path}","compare_url":"https://api.github.com/repos/jrmash/MooseX-App/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jrmash/MooseX-App/merges","archive_url":"https://api.github.com/repos/jrmash/MooseX-App/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jrmash/MooseX-App/downloads","issues_url":"https://api.github.com/repos/jrmash/MooseX-App/issues{/number}","pulls_url":"https://api.github.com/repos/jrmash/MooseX-App/pulls{/number}","milestones_url":"https://api.github.com/repos/jrmash/MooseX-App/milestones{/number}","notifications_url":"https://api.github.com/repos/jrmash/MooseX-App/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jrmash/MooseX-App/labels{/name}","releases_url":"https://api.github.com/repos/jrmash/MooseX-App/releases{/id}","deployments_url":"https://api.github.com/repos/jrmash/MooseX-App/deployments","created_at":"2016-10-08T04:37:53Z","updated_at":"2016-10-08T04:37:55Z","pushed_at":"2016-10-08T21:51:16Z","git_url":"git://github.com/jrmash/MooseX-App.git","ssh_url":"git@github.com:jrmash/MooseX-App.git","clone_url":"https://github.com/jrmash/MooseX-App.git","svn_url":"https://github.com/jrmash/MooseX-App","homepage":"","size":950,"stargazers_count":0,"watchers_count":0,"language":"Perl","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"maros:master","ref":"master","sha":"4b1a77606ab52cdff1309ceb892f13db4e232ad2","user":{"login":"maros","id":82946,"avatar_url":"https://avatars.githubusercontent.com/u/82946?v=3","gravatar_id":"","url":"https://api.github.com/users/maros","html_url":"https://github.com/maros","followers_url":"https://api.github.com/users/maros/followers","following_url":"https://api.github.com/users/maros/following{/other_user}","gists_url":"https://api.github.com/users/maros/gists{/gist_id}","starred_url":"https://api.github.com/users/maros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maros/subscriptions","organizations_url":"https://api.github.com/users/maros/orgs","repos_url":"https://api.github.com/users/maros/repos","events_url":"https://api.github.com/users/maros/events{/privacy}","received_events_url":"https://api.github.com/users/maros/received_events","type":"User","site_admin":false},"repo":{"id":3339305,"name":"MooseX-App","full_name":"maros/MooseX-App","owner":{"login":"maros","id":82946,"avatar_url":"https://avatars.githubusercontent.com/u/82946?v=3","gravatar_id":"","url":"https://api.github.com/users/maros","html_url":"https://github.com/maros","followers_url":"https://api.github.com/users/maros/followers","following_url":"https://api.github.com/users/maros/following{/other_user}","gists_url":"https://api.github.com/users/maros/gists{/gist_id}","starred_url":"https://api.github.com/users/maros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maros/subscriptions","organizations_url":"https://api.github.com/users/maros/orgs","repos_url":"https://api.github.com/users/maros/repos","events_url":"https://api.github.com/users/maros/events{/privacy}","received_events_url":"https://api.github.com/users/maros/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maros/MooseX-App","description":"Write user-friendly command line apps with even less suffering","fork":false,"url":"https://api.github.com/repos/maros/MooseX-App","forks_url":"https://api.github.com/repos/maros/MooseX-App/forks","keys_url":"https://api.github.com/repos/maros/MooseX-App/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maros/MooseX-App/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maros/MooseX-App/teams","hooks_url":"https://api.github.com/repos/maros/MooseX-App/hooks","issue_events_url":"https://api.github.com/repos/maros/MooseX-App/issues/events{/number}","events_url":"https://api.github.com/repos/maros/MooseX-App/events","assignees_url":"https://api.github.com/repos/maros/MooseX-App/assignees{/user}","branches_url":"https://api.github.com/repos/maros/MooseX-App/branches{/branch}","tags_url":"https://api.github.com/repos/maros/MooseX-App/tags","blobs_url":"https://api.github.com/repos/maros/MooseX-App/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maros/MooseX-App/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maros/MooseX-App/git/refs{/sha}","trees_url":"https://api.github.com/repos/maros/MooseX-App/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maros/MooseX-App/statuses/{sha}","languages_url":"https://api.github.com/repos/maros/MooseX-App/languages","stargazers_url":"https://api.github.com/repos/maros/MooseX-App/stargazers","contributors_url":"https://api.github.com/repos/maros/MooseX-App/contributors","subscribers_url":"https://api.github.com/repos/maros/MooseX-App/subscribers","subscription_url":"https://api.github.com/repos/maros/MooseX-App/subscription","commits_url":"https://api.github.com/repos/maros/MooseX-App/commits{/sha}","git_commits_url":"https://api.github.com/repos/maros/MooseX-App/git/commits{/sha}","comments_url":"https://api.github.com/repos/maros/MooseX-App/comments{/number}","issue_comment_url":"https://api.github.com/repos/maros/MooseX-App/issues/comments{/number}","contents_url":"https://api.github.com/repos/maros/MooseX-App/contents/{+path}","compare_url":"https://api.github.com/repos/maros/MooseX-App/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maros/MooseX-App/merges","archive_url":"https://api.github.com/repos/maros/MooseX-App/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maros/MooseX-App/downloads","issues_url":"https://api.github.com/repos/maros/MooseX-App/issues{/number}","pulls_url":"https://api.github.com/repos/maros/MooseX-App/pulls{/number}","milestones_url":"https://api.github.com/repos/maros/MooseX-App/milestones{/number}","notifications_url":"https://api.github.com/repos/maros/MooseX-App/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maros/MooseX-App/labels{/name}","releases_url":"https://api.github.com/repos/maros/MooseX-App/releases{/id}","deployments_url":"https://api.github.com/repos/maros/MooseX-App/deployments","created_at":"2012-02-02T22:05:07Z","updated_at":"2016-09-04T10:08:41Z","pushed_at":"2016-10-08T21:51:16Z","git_url":"git://github.com/maros/MooseX-App.git","ssh_url":"git@github.com:maros/MooseX-App.git","clone_url":"https://github.com/maros/MooseX-App.git","svn_url":"https://github.com/maros/MooseX-App","homepage":"","size":980,"stargazers_count":9,"watchers_count":9,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":11,"forks":21,"open_issues":11,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/maros/MooseX-App/pulls/44"},"html":{"href":"https://github.com/maros/MooseX-App/pull/44"},"issue":{"href":"https://api.github.com/repos/maros/MooseX-App/issues/44"},"comments":{"href":"https://api.github.com/repos/maros/MooseX-App/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/maros/MooseX-App/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/maros/MooseX-App/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/maros/MooseX-App/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/maros/MooseX-App/statuses/ca0906d263ec2b7ad0e39ea176e6039b8259f0f3"}}}}
{"actor":{"display_login":"maros"}}