Catalyst-Plugin-ActionPaths

 view release on metacpan or  search on metacpan

lib/Catalyst/Plugin/ActionPaths.pm  view on Meta::CPAN

          $display_path =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg; # deconvert urlencoded for pretty view·
          $display_path = decode_utf8 $display_path;  # URI does encoding
          $action->{path} = $display_path;
          push @actions, $action;
        }
      }
    }
    elsif (ref $dt eq 'Catalyst::DispatchType::Chained')
    {
      # taken from Catalyst::DispatchType::Chained
      ENDPOINT: foreach my $endpoint (
                    sort { $a->reverse cmp $b->reverse }
                             @{ $dt->_endpoints }
                    ) {
          my $args = $endpoint->list_extra_info->{Args};
          my @parts = (defined($endpoint->attributes->{Args}[0]) ? (("*") x $args) : '...');
          my @parents = ();
          my $parent = "DUMMY";
          my $extra  = $dt->_list_extra_http_methods($endpoint);
          my $consumes = $dt->_list_extra_consumes($endpoint);
          my $scheme = $dt->_list_extra_scheme($endpoint);
          my $curr = $endpoint;
          my $action = $endpoint;
          while ($curr) {
              if (my $cap = $curr->list_extra_info->{CaptureArgs}) {
                  unshift(@parts, (("*") x $cap));
              }
              if (my $pp = $curr->attributes->{PathPart}) {
                  unshift(@parts, $pp->[0])
                      if (defined $pp->[0] && length $pp->[0]);
              }
              $parent = $curr->attributes->{Chained}->[0];
              $curr = $dt->_actions->{$parent};

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 2.116 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )