{"action":"closed","issue":{"url":"https://api.github.com/repos/iinteractive/OX/issues/18","labels_url":"https://api.github.com/repos/iinteractive/OX/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/iinteractive/OX/issues/18/comments","events_url":"https://api.github.com/repos/iinteractive/OX/issues/18/events","html_url":"https://github.com/iinteractive/OX/issues/18","id":115073619,"number":18,"title":"wrap middleware with classname not working","user":{"login":"davewood","id":304895,"avatar_url":"https://avatars.githubusercontent.com/u/304895?v=3","gravatar_id":"","url":"https://api.github.com/users/davewood","html_url":"https://github.com/davewood","followers_url":"https://api.github.com/users/davewood/followers","following_url":"https://api.github.com/users/davewood/following{/other_user}","gists_url":"https://api.github.com/users/davewood/gists{/gist_id}","starred_url":"https://api.github.com/users/davewood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davewood/subscriptions","organizations_url":"https://api.github.com/users/davewood/orgs","repos_url":"https://api.github.com/users/davewood/repos","events_url":"https://api.github.com/users/davewood/events{/privacy}","received_events_url":"https://api.github.com/users/davewood/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-04T15:08:00Z","updated_at":"2015-11-09T09:25:03Z","closed_at":"2015-11-09T09:25:03Z","body":"DOES NOT WORK (see error msg below)\r\n\r\nrouter as { \r\n    wrap 'Plack::Middleware::Header' => ( set => [ foo => 'bar' ] );\r\n};\r\n\r\nTHIS WORKS:\r\n\r\nuse Plack::Middleware::Header;\r\nmy $mw = Plack::Middleware::Header->new( set => [ foo => 'bar' ] );\r\nrouter as { \r\n    wrap $mw;\r\n    ...\r\n};\r\n\r\n\r\nERROR MSG\r\n\r\nCould not find container or service for foo in Mox::Web at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/Traversable.pm line 106.\r\n\tBread::Board::Traversable::_get_container_or_service(Mox::Web=HASH(0x54c8ea8), 4) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/Traversable.pm line 56\r\n\tBread::Board::Traversable::fetch(Bread::Board::Dependency=HASH(0x5970e90), 4) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/Dependency.pm line 44\r\n\tBread::Board::Dependency::__ANON__(Bread::Board::Dependency=HASH(0x5970e90)) called at reader Bread::Board::Dependency::service (defined at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/Dependency.pm line 46) line 6\r\n\tBread::Board::Dependency::service(Bread::Board::Dependency=HASH(0x5970e90)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/Service/WithDependencies.pm line 51\r\n\tBread::Board::Service::WithDependencies::resolve_dependencies(Bread::Board::BlockInjection=HASH(0x5972250)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/Service/WithDependencies.pm line 39\r\n\tClass::MOP::Class:::around(CODE(0x38beb20), Bread::Board::BlockInjection=HASH(0x5972250)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux/Class/MOP/Method/Wrapped.pm line 158\r\n\tClass::MOP::Method::Wrapped::__ANON__(Bread::Board::BlockInjection=HASH(0x5972250)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux/Class/MOP/Method/Wrapped.pm line 87\r\n\tBread::Board::BlockInjection::init_params(Bread::Board::BlockInjection=HASH(0x5972250)) called at accessor Bread::Board::BlockInjection::params (defined at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/Service.pm line 19) line 11\r\n\tBread::Board::BlockInjection::params(Bread::Board::BlockInjection=HASH(0x5972250)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/Service/WithParameters.pm line 36\r\n\tClass::MOP::Class:::before(Bread::Board::BlockInjection=HASH(0x5972250)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux/Class/MOP/Method/Wrapped.pm line 26\r\n\tClass::MOP::Method::Wrapped::__ANON__(Bread::Board::BlockInjection=HASH(0x5972250)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux/Class/MOP/Method/Wrapped.pm line 87\r\n\tBread::Board::BlockInjection::get(Bread::Board::BlockInjection=HASH(0x5972250)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/Service/WithDependencies.pm line 91\r\n\tBread::Board::Service::WithDependencies::try {...} () called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Try/Tiny.pm line 81\r\n\teval {...} called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Try/Tiny.pm line 72\r\n\tTry::Tiny::try(CODE(0x5972310), Try::Tiny::Finally=REF(0x58ca058), Try::Tiny::Catch=REF(0x58ca040)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/Service/WithDependencies.pm line 97\r\n\tBread::Board::Service::WithDependencies::resolve_dependencies(Bread::Board::BlockInjection=HASH(0x59436b8)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/Service/WithDependencies.pm line 39\r\n\tClass::MOP::Class:::around(CODE(0x38beb20), Bread::Board::BlockInjection=HASH(0x59436b8)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux/Class/MOP/Method/Wrapped.pm line 158\r\n\tClass::MOP::Method::Wrapped::__ANON__(Bread::Board::BlockInjection=HASH(0x59436b8)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux/Class/MOP/Method/Wrapped.pm line 87\r\n\tBread::Board::BlockInjection::init_params(Bread::Board::BlockInjection=HASH(0x59436b8)) called at accessor Bread::Board::BlockInjection::params (defined at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/Service.pm line 19) line 11\r\n\tBread::Board::BlockInjection::params(Bread::Board::BlockInjection=HASH(0x59436b8)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/Service/WithParameters.pm line 36\r\n\tClass::MOP::Class:::before(Bread::Board::BlockInjection=HASH(0x59436b8)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux/Class/MOP/Method/Wrapped.pm line 26\r\n\tClass::MOP::Method::Wrapped::__ANON__(Bread::Board::BlockInjection=HASH(0x59436b8)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux/Class/MOP/Method/Wrapped.pm line 87\r\n\tBread::Board::BlockInjection::get(Bread::Board::BlockInjection=HASH(0x59436b8)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/OX/Meta/Middleware.pm line 104\r\n\tOX::Meta::Middleware::resolve(OX::Meta::Middleware=HASH(0x500aa48), Mox::Web=HASH(0x54c8ea8)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/OX/Application/Role/Sugar.pm line 49\r\n\tClass::MOP::Class:::around(CODE(0x45d9e80), Mox::Web=HASH(0x54c8ea8), Bread::Board::BlockInjection=HASH(0x5503398)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux/Class/MOP/Method/Wrapped.pm line 158\r\n\tClass::MOP::Method::Wrapped::__ANON__(Mox::Web=HASH(0x54c8ea8), Bread::Board::BlockInjection=HASH(0x5503398)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux/Class/MOP/Method/Wrapped.pm line 87\r\n\tMoose::Meta::Class::__ANON__::SERIAL::21::build_middleware(Mox::Web=HASH(0x54c8ea8), Bread::Board::BlockInjection=HASH(0x5503398)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/OX/Application.pm line 36\r\n\tOX::Application::__ANON__(Bread::Board::BlockInjection=HASH(0x5503398)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/BlockInjection.pm line 21\r\n\tBread::Board::BlockInjection::get(Bread::Board::BlockInjection=HASH(0x5503398)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux/Class/MOP/Method/Wrapped.pm line 28\r\n\tClass::MOP::Method::Wrapped::__ANON__(Bread::Board::BlockInjection=HASH(0x5503398)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux/Class/MOP/Method/Wrapped.pm line 87\r\n\tBread::Board::BlockInjection::get(Bread::Board::BlockInjection=HASH(0x5503398)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/Service/WithDependencies.pm line 91\r\n\tBread::Board::Service::WithDependencies::try {...} () called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Try/Tiny.pm line 81\r\n\teval {...} called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Try/Tiny.pm line 72\r\n\tTry::Tiny::try(CODE(0x582b710), Try::Tiny::Finally=REF(0x582b890), Try::Tiny::Catch=REF(0x5939bf0)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/Service/WithDependencies.pm line 97\r\n\tBread::Board::Service::WithDependencies::resolve_dependencies(Bread::Board::BlockInjection=HASH(0x5504238)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/Service/WithDependencies.pm line 39\r\n\tClass::MOP::Class:::around(CODE(0x38beb20), Bread::Board::BlockInjection=HASH(0x5504238)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux/Class/MOP/Method/Wrapped.pm line 158\r\n\tClass::MOP::Method::Wrapped::__ANON__(Bread::Board::BlockInjection=HASH(0x5504238)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux/Class/MOP/Method/Wrapped.pm line 87\r\n\tBread::Board::BlockInjection::init_params(Bread::Board::BlockInjection=HASH(0x5504238)) called at accessor Bread::Board::BlockInjection::params (defined at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/Service.pm line 19) line 11\r\n\tBread::Board::BlockInjection::params(Bread::Board::BlockInjection=HASH(0x5504238)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/Service/WithParameters.pm line 36\r\n\tClass::MOP::Class:::before(Bread::Board::BlockInjection=HASH(0x5504238)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux/Class/MOP/Method/Wrapped.pm line 26\r\n\tClass::MOP::Method::Wrapped::__ANON__(Bread::Board::BlockInjection=HASH(0x5504238)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux/Class/MOP/Method/Wrapped.pm line 87\r\n\tBread::Board::BlockInjection::get(Bread::Board::BlockInjection=HASH(0x5504238)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Bread/Board/Container.pm line 159\r\n\tBread::Board::Container::resolve(undef, \"service\", \"App\") called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/OX/Application.pm line 112\r\n\tOX::Application::to_app(Mox::Web=HASH(0x54c8ea8), HASH(0x54c8cf8)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/OX/Application/Role/Sugar.pm line 104\r\n\tOX::Application::Role::Sugar::__ANON__(HASH(0x54c8cf8)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Plack/Middleware/Lint.pm line 24\r\n\tPlack::Middleware::Lint::call(Plack::Middleware::Lint=HASH(0x2964be8), HASH(0x54c8cf8)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Plack/Component.pm line 50\r\n\tPlack::Component::__ANON__(HASH(0x54c8cf8)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Plack/Middleware/StackTrace.pm line 38\r\n\tPlack::Middleware::StackTrace::try {...} () called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Try/Tiny.pm line 79\r\n\teval {...} called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Try/Tiny.pm line 72\r\n\tTry::Tiny::try(CODE(0x5829ad0), Try::Tiny::Catch=REF(0x5808580)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Plack/Middleware/StackTrace.pm line 42\r\n\tPlack::Middleware::StackTrace::call(Plack::Middleware::StackTrace=HASH(0x54dbaa8), HASH(0x54c8cf8)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Plack/Component.pm line 50\r\n\tPlack::Component::__ANON__(HASH(0x54c8cf8)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Plack/Middleware/AccessLog.pm line 24\r\n\tPlack::Middleware::AccessLog::call(Plack::Middleware::AccessLog=HASH(0x54c8b18), HASH(0x54c8cf8)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Plack/Component.pm line 50\r\n\tPlack::Component::__ANON__(HASH(0x54c8cf8)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Plack/Middleware/ContentLength.pm line 10\r\n\tPlack::Middleware::ContentLength::call(Plack::Middleware::ContentLength=HASH(0x5820d18), HASH(0x54c8cf8)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Plack/Component.pm line 50\r\n\tPlack::Component::__ANON__(HASH(0x54c8cf8)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Plack/Util.pm line 142\r\n\teval {...} called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Plack/Util.pm line 142\r\n\tPlack::Util::run_app(CODE(0x5820c58), HASH(0x54c8cf8)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/HTTP/Server/PSGI.pm line 170\r\n\tHTTP::Server::PSGI::handle_connection(HTTP::Server::PSGI=HASH(0x5820ad8), HASH(0x54c8cf8), IO::Socket::INET=GLOB(0x55037a0), CODE(0x5820c58)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/HTTP/Server/PSGI.pm line 129\r\n\tHTTP::Server::PSGI::accept_loop(HTTP::Server::PSGI=HASH(0x5820ad8), CODE(0x383a038)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/HTTP/Server/PSGI.pm line 55\r\n\tHTTP::Server::PSGI::run(HTTP::Server::PSGI=HASH(0x5820ad8), CODE(0x383a038)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Plack/Handler/HTTP/Server/PSGI.pm line 14\r\n\tPlack::Handler::HTTP::Server::PSGI::run(Plack::Handler::Standalone=HASH(0x25d9a10), CODE(0x383a038)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Plack/Loader/Restarter.pm line 32\r\n\tPlack::Loader::Restarter::_fork_and_start(Plack::Loader::Restarter=HASH(0x245af98), Plack::Handler::Standalone=HASH(0x25d9a10)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Plack/Loader/Restarter.pm line 89\r\n\tPlack::Loader::Restarter::run(Plack::Loader::Restarter=HASH(0x245af98), Plack::Handler::Standalone=HASH(0x25d9a10)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Plack/Runner.pm line 277\r\n\tPlack::Runner::run(Plack::Runner=HASH(0x213db10)) called at /home/david/perl5/perlbrew/perls/perl-5.20.1/bin/plackup line 10\r\n at /home/david/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/Carp.pm line 167"}}