{"action":"opened","issue":{"url":"https://api.github.com/repos/rjbs/Process-Status/issues/4","repository_url":"https://api.github.com/repos/rjbs/Process-Status","labels_url":"https://api.github.com/repos/rjbs/Process-Status/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/rjbs/Process-Status/issues/4/comments","events_url":"https://api.github.com/repos/rjbs/Process-Status/issues/4/events","html_url":"https://github.com/rjbs/Process-Status/issues/4","id":147155148,"number":4,"title":"Add slots for stdout/stderr","user":{"login":"preaction","id":53707,"avatar_url":"https://avatars.githubusercontent.com/u/53707?v=3","gravatar_id":"","url":"https://api.github.com/users/preaction","html_url":"https://github.com/preaction","followers_url":"https://api.github.com/users/preaction/followers","following_url":"https://api.github.com/users/preaction/following{/other_user}","gists_url":"https://api.github.com/users/preaction/gists{/gist_id}","starred_url":"https://api.github.com/users/preaction/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/preaction/subscriptions","organizations_url":"https://api.github.com/users/preaction/orgs","repos_url":"https://api.github.com/users/preaction/repos","events_url":"https://api.github.com/users/preaction/events{/privacy}","received_events_url":"https://api.github.com/users/preaction/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-09T19:19:07Z","updated_at":"2016-04-09T19:19:07Z","closed_at":null,"body":"I'd like to encapsulate the output of a method that runs an external command in such a way that one could do:\r\n\r\n```perl\r\n# $output is a Process::Status object\r\n$output = $cmd->run( ... ) or die q{Could not run command \"mycommand\": } . $output->as_string . \"\\nSTDOUT: \" . $output->stdout . \"\\nSTDERR: \" . $output->stderr;\r\n```\r\n\r\nI was considering System::Command, but too much in there involves the running of the actual command.\r\n\r\nIf you approve, I can provide a patch. If this isn't appropriate for this module, I can build a subclass (Process::Output) or if you have a suggestion, I'm open to it."}}