{"action":"closed","issue":{"url":"https://api.github.com/repos/celogeek/MooX-Options/issues/40","labels_url":"https://api.github.com/repos/celogeek/MooX-Options/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/celogeek/MooX-Options/issues/40/comments","events_url":"https://api.github.com/repos/celogeek/MooX-Options/issues/40/events","html_url":"https://github.com/celogeek/MooX-Options/issues/40","id":72973992,"number":40,"title":"No pass_through mode","user":{"login":"alexander-brett","id":5473938,"avatar_url":"https://avatars.githubusercontent.com/u/5473938?v=3","gravatar_id":"","url":"https://api.github.com/users/alexander-brett","html_url":"https://github.com/alexander-brett","followers_url":"https://api.github.com/users/alexander-brett/followers","following_url":"https://api.github.com/users/alexander-brett/following{/other_user}","gists_url":"https://api.github.com/users/alexander-brett/gists{/gist_id}","starred_url":"https://api.github.com/users/alexander-brett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexander-brett/subscriptions","organizations_url":"https://api.github.com/users/alexander-brett/orgs","repos_url":"https://api.github.com/users/alexander-brett/repos","events_url":"https://api.github.com/users/alexander-brett/events{/privacy}","received_events_url":"https://api.github.com/users/alexander-brett/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-04T09:40:09Z","updated_at":"2015-05-04T09:57:50Z","closed_at":"2015-05-04T09:57:50Z","body":"I'd really like to be able to write several modules with input, output, and processing roles, and do something like:\r\n\r\n```perl\r\npackage Input::Module;\r\nuse Moo;\r\nuse MooX::Options 'pass_through';\r\noption 'infile',  is => 'ro', required => 1;\r\noption 'informat', is=>'ro', default => 'CSV';\r\n\r\npackage Output::Module;\r\nuse Moo;\r\nuse MooX::Options 'pass_through';\r\noption 'outfile',  is => 'ro', default => 'output.csv';\r\noption 'outformat', is=>'ro', default => 'CSV';\r\n\r\npackage main;\r\n$input = Input::Module->new_with_options;\r\n$output = Output::Module->new_with_options;\r\n```\r\n\r\nThen when I called `perl script.pl --outfile foo.json --infile bar --outformat JSON` I get something useful. \r\n\r\nI think there would be 2 ways of implementing this option:\r\n- `new_with_options` ignores anything it doesn't recognise and doesn't modify `@ARGV`\r\n- `new_with_options` ignores anything it doesn't recognise and removes anything it does from `@ARGV`\r\n\r\nGetopt::Long does the second.\r\n\r\nWhat do you think?"}}