}
sub _match_against {
- return ({}, $_[1]) unless $_[0]->{matches};
- $_[0]->{matches}->($_[1]);
+ return ({}, $_[1]) unless $_[0]->{match};
+ $_[0]->{match}->($_[1]);
}
sub _execute_with {
: undef
);
my $new = $class->_build_dispatcher({
- matches => $matcher,
+ match => $matcher,
call => sub { shift;
shift->_run_with_self($dispatch_sub, @_)
},
sub run {
my $self = shift;
if ($ENV{GATEWAY_INTERFACE}) {
- $self->_run_cgi;
+ return $self->_run_cgi;
}
my $path = shift(@ARGV) or die "No path passed - use $0 / for root";