X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FWeb%2FSimple%2FApplication.pm;h=be34500302fc95f47f5ff5a4cb893a906d89da89;hb=bb436cfb058ce28eadd89b4a4f6d405a3520ffeb;hp=c24ac7911ebd060c8fb8db17e7ad2bf37ff2764a;hpb=e27ab5c58dc809041fcf3ef09cfc2e1ba9f4066a;p=catagits%2FWeb-Simple.git diff --git a/lib/Web/Simple/Application.pm b/lib/Web/Simple/Application.pm index c24ac79..be34500 100644 --- a/lib/Web/Simple/Application.pm +++ b/lib/Web/Simple/Application.pm @@ -27,7 +27,7 @@ use warnings FATAL => 'all'; my ($self, $env, @args) = @_; my $next = $self->_has_match ? $self->next : undef; if (my ($env_delta, @match) = $self->_match_against($env)) { - if (my ($result) = $self->_execute_with(@args, @match)) { + if (my ($result) = $self->_execute_with(@args, @match, $env)) { if ($self->_is_dispatcher($result)) { $next = $result->set_next($next); $env = { %$env, %$env_delta }; @@ -191,7 +191,7 @@ sub _build_dispatcher_from_spec { my $matcher = ( defined($proto) && length($proto) ? $parser->parse_dispatch_specification($proto) - : undef + : sub { ({}, $_[1]) } ); return $class->_build_dispatcher({ match => $matcher,