CatalystX-Action-Negotiate

 view release on metacpan or  search on metacpan

lib/CatalystX/ActionRole/Negotiate.pm  view on Meta::CPAN


    my @ps;

    # XXX flip this later maybe
    if ($c->stash->{negotiate_use_args}) {
        @ps = @args;
    }
    else {
        # get a clean URI path. (unfortunately Path::Class doesn't get it
        # this clean)
        @ps = map { (/^([^;]*)(?:;.*)?$/) } split m!/+!, $req->path;
        my $i = 0;
        while ($i < @ps) {
            if ($ps[$i] eq '' or $ps[$i] eq '.') {
                splice @ps, $i, 1;
            }
            elsif ($ps[$i] eq '..') {
                $i > 0 ? splice @ps, $i-1, 2 : splice @ps, $i, 1;
            }
            else {
                $i++;



( run in 1.666 second using v1.01-cache-2.11-cpan-71847e10f99 )