CatalystX-PathContext

 view release on metacpan or  search on metacpan

lib/CatalystX/PathContext.pm  view on Meta::CPAN

                }

                # find if we should handle this url part
                if ( $request_path =~ m{$context_ref->{match}}xms ) {
                    # write a copy of named captures into path_context stash key
                    $c->stash()->{path_context}->{$context_ref->{name}} = { %+ };

                    # push each path part into removed array for
                    # rewrite of path_segments
                    push @removed,
                        split m{/}xms, $&;  ## no critic (ProhibitMatchVars)

                    # remove from request path
                    $request_path =~ s{$context_ref->{match}}{}xms;
                }
            }
        }
    }

    # Stuff modified request path back into request:
    $c->request()->path($request_path);



( run in 1.170 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )